subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1625496 - /subversion/trunk/subversion/svnmucc/svnmucc.c
Date Wed, 17 Sep 2014 09:26:28 GMT
Author: julianfoad
Date: Wed Sep 17 09:26:28 2014
New Revision: 1625496

URL: http://svn.apache.org/r1625496
Log:
Fix a crash in 'svnmucc --version' when extra arguments are given.

For example, 'svnmucc --version -q' crashed. For now, just ignore any extra
arguments. Ideally we should handle the 'version' and 'help' options more
like the way the other command-line programs do, validating all arguments
before executing the request.

* subversion/svnmucc/svnmucc.c
  (display_version): Don't pass an 'opt state' to the help function, as we
    have no corresponding command table to pass with it.
  (sub_main): Adjust the call.

Modified:
    subversion/trunk/subversion/svnmucc/svnmucc.c

Modified: subversion/trunk/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnmucc/svnmucc.c?rev=1625496&r1=1625495&r2=1625496&view=diff
==============================================================================
--- subversion/trunk/subversion/svnmucc/svnmucc.c (original)
+++ subversion/trunk/subversion/svnmucc/svnmucc.c Wed Sep 17 09:26:28 2014
@@ -308,7 +308,7 @@ insufficient(void)
 }
 
 static svn_error_t *
-display_version(apr_getopt_t *os, apr_pool_t *pool)
+display_version(apr_pool_t *pool)
 {
   const char *ra_desc_start
     = "The following repository access (RA) modules are available:\n\n";
@@ -317,7 +317,7 @@ display_version(apr_getopt_t *os, apr_po
   version_footer = svn_stringbuf_create(ra_desc_start, pool);
   SVN_ERR(svn_ra_print_modules(version_footer, pool));
 
-  SVN_ERR(svn_opt_print_help4(os, "svnmucc", TRUE, FALSE, FALSE,
+  SVN_ERR(svn_opt_print_help4(NULL, "svnmucc", TRUE, FALSE, FALSE,
                               version_footer->data,
                               NULL, NULL, NULL, NULL, NULL, pool));
 
@@ -582,7 +582,7 @@ sub_main(int *exit_code, int argc, const
           no_auth_cache = TRUE;
           break;
         case version_opt:
-          SVN_ERR(display_version(opts, pool));
+          SVN_ERR(display_version(pool));
           return SVN_NO_ERROR;
         case 'h':
         case '?':



Mime
View raw message