[asterisk-commits] seanbright: trunk r168626 - /trunk/main/cli.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 14 17:10:48 CST 2009


Author: seanbright
Date: Wed Jan 14 17:10:48 2009
New Revision: 168626

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168626
Log:
Don't crash when typing 'core set verbose' or 'core set debug' by themselves.

(closes issue #14219)
Reported by: jamesgolovich
Patches:
      asterisk-setverbosecrash.diff.txt uploaded by jamesgolovich (license 176)

Modified:
    trunk/main/cli.c

Modified: trunk/main/cli.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/main/cli.c?view=diff&rev=168626&r1=168625&r2=168626
==============================================================================
--- trunk/main/cli.c (original)
+++ trunk/main/cli.c Wed Jan 14 17:10:48 2009
@@ -415,7 +415,7 @@
 	 * we are guaranteed to be called with argc >= e->args;
 	 */
 
-	if (argc < e->args)
+	if (argc <= e->args)
 		return CLI_SHOWUSAGE;
 	if (!strcasecmp(argv[e->args - 1], "debug")) {
 		dst = &option_debug;




More information about the asterisk-commits mailing list