subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r995484 - /subversion/trunk/subversion/libsvn_repos/load.c
Date Thu, 09 Sep 2010 16:28:48 GMT
Author: stsp
Date: Thu Sep  9 16:28:48 2010
New Revision: 995484

URL: http://svn.apache.org/viewvc?rev=995484&view=rev
Log:
* subversion/libsvn_repos/load.c
  (parse_property_block): Replace two more occurrences of atoi() with
   svn_cstring_atoi64(), switching to 64bit because size_t isn't
   guaranteed to be 32bit.

Modified:
    subversion/trunk/subversion/libsvn_repos/load.c

Modified: subversion/trunk/subversion/libsvn_repos/load.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/load.c?rev=995484&r1=995483&r2=995484&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/load.c (original)
+++ subversion/trunk/subversion/libsvn_repos/load.c Thu Sep  9 16:28:48 2010
@@ -450,9 +450,11 @@ parse_property_block(svn_stream_t *strea
       else if ((buf[0] == 'K') && (buf[1] == ' '))
         {
           char *keybuf;
+          apr_int64_t len;
 
+          SVN_ERR(svn_cstring_atoi64(&len, buf + 2));
           SVN_ERR(read_key_or_val(&keybuf, actual_length,
-                                  stream, atoi(buf + 2), proppool));
+                                  stream, (apr_size_t)len, proppool));
 
           /* Read a val length line */
           SVN_ERR(svn_stream_readline(stream, &strbuf, "\n", &eof, proppool));
@@ -466,8 +468,10 @@ parse_property_block(svn_stream_t *strea
             {
               svn_string_t propstring;
               char *valbuf;
+              apr_int64_t val;
 
-              propstring.len = atoi(buf + 2);
+              SVN_ERR(svn_cstring_atoi64(&val, buf + 2));
+              propstring.len = (apr_size_t)val;
               SVN_ERR(read_key_or_val(&valbuf, actual_length,
                                       stream, propstring.len, proppool));
               propstring.data = valbuf;



Mime
View raw message