diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-12-23 02:55:24 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-12-23 02:55:24 +0000 |
commit | 9fe7d22d334f5866507d8ca5981be8dd09daa052 (patch) | |
tree | 3fd7e5c1b279ea6297c034e93c23816878712c1d /res | |
parent | 8c26e2897d8dacf05598f2fbd68ffd278535c65e (diff) |
If EXEC only gets a single argument, don't crash when the second is used.
(closes issue #16504)
Reported by: bklang
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@236184 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_agi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index 665ccb1f5..f0da5e2fc 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -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; |