You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/09/09 18:28:48 UTC

svn commit: r995484 - /subversion/trunk/subversion/libsvn_repos/load.c

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;