]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix crash when dialplan remove include is called with too few arguments.
authorWalter Doekes <walter+asterisk@wjd.nu>
Tue, 8 Nov 2011 19:27:10 +0000 (19:27 +0000)
committerWalter Doekes <walter+asterisk@wjd.nu>
Tue, 8 Nov 2011 19:27:10 +0000 (19:27 +0000)
"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
........

Merged revisions 343936 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@343944 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx/pbx_config.c

index f0da2e87aeb759634576e82fb9fd2eab73724ad1..91cfe04e958efdf6999110cc340a58592b86aa88 100644 (file)
@@ -87,7 +87,7 @@ static char *handle_cli_dialplan_remove_include(struct ast_cli_entry *e, int cmd
                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)) {