Author: stsp
Date: Mon Oct 25 20:17:03 2010
New Revision: 1027253
URL: http://svn.apache.org/viewvc?rev=1027253&view=rev
Log:
* subversion/svn/main.c
(main): Parse argument to the --limit option with svn_cstring_atoi()
instead of strtol().
Modified:
subversion/trunk/subversion/svn/main.c
Modified: subversion/trunk/subversion/svn/main.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/main.c?rev=1027253&r1=1027252&r2=1027253&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/main.c (original)
+++ subversion/trunk/subversion/svn/main.c Mon Oct 25 20:17:03 2010
@@ -1325,11 +1325,10 @@ main(int argc, const char *argv[])
switch (opt_id) {
case 'l':
{
- char *end;
- opt_state.limit = (int) strtol(opt_arg, &end, 10);
- if (end == opt_arg || *end != '\0')
+ err = svn_cstring_atoi(&opt_state.limit, opt_arg);
+ if (err)
{
- err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, err,
_("Non-numeric limit argument given"));
return svn_cmdline_handle_exit_error(err, pool, "svn: ");
}