subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1787045 - in /subversion/trunk/subversion: svnfsfs/svnfsfs.c svnlook/svnlook.c svnserve/svnserve.c
Date Wed, 15 Mar 2017 13:47:05 GMT
Author: rhuijben
Date: Wed Mar 15 13:47:05 2017
New Revision: 1787045

URL: http://svn.apache.org/viewvc?rev=1787045&view=rev
Log:
Following up on r1787023, also validate the --memory-cache-size/-M
argument on a few other tools.

Note that svnsync uses the same argument, but implements this in a
different way than all these other tools.

* subversion/svnfsfs/svnfsfs.c
  (sub_main): Validate argument.

* subversion/svnlook/svnlook.c
  (sub_main): Validate argument.

* subversion/svnserve/svnserve.c
  (sub_main): Validate argument.

Modified:
    subversion/trunk/subversion/svnfsfs/svnfsfs.c
    subversion/trunk/subversion/svnlook/svnlook.c
    subversion/trunk/subversion/svnserve/svnserve.c

Modified: subversion/trunk/subversion/svnfsfs/svnfsfs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnfsfs/svnfsfs.c?rev=1787045&r1=1787044&r2=1787045&view=diff
==============================================================================
--- subversion/trunk/subversion/svnfsfs/svnfsfs.c (original)
+++ subversion/trunk/subversion/svnfsfs/svnfsfs.c Wed Mar 15 13:47:05 2017
@@ -301,8 +301,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 svnfsfs__version:
         opt_state.version = TRUE;

Modified: subversion/trunk/subversion/svnlook/svnlook.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnlook/svnlook.c?rev=1787045&r1=1787044&r2=1787045&view=diff
==============================================================================
--- subversion/trunk/subversion/svnlook/svnlook.c (original)
+++ subversion/trunk/subversion/svnlook/svnlook.c Wed Mar 15 13:47:05 2017
@@ -2505,8 +2505,12 @@ sub_main(int *exit_code, int argc, const
           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 'N':

Modified: subversion/trunk/subversion/svnserve/svnserve.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/svnserve.c?rev=1787045&r1=1787044&r2=1787045&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/svnserve.c (original)
+++ subversion/trunk/subversion/svnserve/svnserve.c Wed Mar 15 13:47:05 2017
@@ -901,7 +901,12 @@ sub_main(int *exit_code, int argc, const
           break;
 
         case 'M':
-          params.memory_cache_size = 0x100000 * apr_strtoi64(arg, NULL, 0);
+          {
+            apr_uint64_t sz_val;
+            SVN_ERR(svn_cstring_atoui64(&sz_val, arg));
+
+            params.memory_cache_size = 0x100000 * sz_val;
+          }
           break;
 
         case SVNSERVE_OPT_CACHE_TXDELTAS:



Mime
View raw message