[asterisk-commits] wdoekes: branch 1.8 r343936 - /branches/1.8/pbx/pbx_config.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 8 13:25:10 CST 2011


Author: wdoekes
Date: Tue Nov  8 13:25:05 2011
New Revision: 343936

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=343936
Log:
Fix crash when dialplan remove include is called with too few arguments.

"dialplan remove include x from y" crashed when the amount of arguments
was less than 6.

(closes issue ASTERISK-18762)
Reported by: Andrey Solovyev
Tested by: Andrey Solovyev

Modified:
    branches/1.8/pbx/pbx_config.c

Modified: branches/1.8/pbx/pbx_config.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/pbx/pbx_config.c?view=diff&rev=343936&r1=343935&r2=343936
==============================================================================
--- branches/1.8/pbx/pbx_config.c (original)
+++ branches/1.8/pbx/pbx_config.c Tue Nov  8 13:25:05 2011
@@ -87,7 +87,7 @@
 		return complete_dialplan_remove_include(a);
 	}
 
-	if (strcmp(a->argv[4], "from"))
+	if (a->argc != 6 || strcmp(a->argv[4], "from"))
 		return CLI_SHOWUSAGE;
 
 	if (!ast_context_remove_include(a->argv[5], a->argv[3], registrar)) {




More information about the asterisk-commits mailing list