mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-23 16:05:30 -07:00
If EXEC only gets a single argument, don't crash when the second is used.
(closes issue #16504) Reported by: bklang git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@236184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
+1
-1
@@ -1140,7 +1140,7 @@ static int handle_exec(struct ast_channel *chan, AGI *agi, int argc, char **argv
|
||||
if(!strcasecmp(argv[1], PARK_APP_NAME)) {
|
||||
ast_masq_park_call(chan, NULL, 0, NULL);
|
||||
}
|
||||
res = pbx_exec(chan, app, argv[2]);
|
||||
res = pbx_exec(chan, app, argc == 2 ? "" : argv[2]);
|
||||
} else {
|
||||
ast_log(LOG_WARNING, "Could not find application (%s)\n", argv[1]);
|
||||
res = -2;
|
||||
|
||||
Reference in New Issue
Block a user