subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1787023 - /subversion/trunk/subversion/svnadmin/svnadmin.c
Date Wed, 15 Mar 2017 10:57:47 GMT
Author: rhuijben
Date: Wed Mar 15 10:57:46 2017
New Revision: 1787023

URL: http://svn.apache.org/viewvc?rev=1787023&view=rev
Log:
Properly validate if argument parsing failed on -M.

* subversion/svnadmin/svnadmin.c
  (sub_main): Properly validate argument on --memory-cache-size and -M,

Modified:
    subversion/trunk/subversion/svnadmin/svnadmin.c

Modified: subversion/trunk/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnadmin/svnadmin.c?rev=1787023&r1=1787022&r2=1787023&view=diff
==============================================================================
--- subversion/trunk/subversion/svnadmin/svnadmin.c (original)
+++ subversion/trunk/subversion/svnadmin/svnadmin.c Wed Mar 15 10:57:46 2017
@@ -2729,8 +2729,12 @@ sub_main(int *exit_code, int argc, const
         opt_state.help = TRUE;
         break;
       case 'M':
-        opt_state.memory_cache_size
-            = 0x100000 * apr_strtoi64(opt_arg, NULL, 0);
+        {
+          apr_uint64_t sz_val;
+          SVN_ERR(svn_cstring_atoui64(&sz_val, opt_arg));
+
+          opt_state.memory_cache_size = 0x100000 * sz_val;
+        }
         break;
       case 'F':
         SVN_ERR(svn_utf_cstring_to_utf8(&(opt_state.file), opt_arg, pool));



Mime
View raw message