aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_exec.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-30 22:15:28 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-30 22:15:28 +0000
commit38c3eb5f9db0da5e0a83b44cf4b0e383fad0b481 (patch)
treebaa837366b3c3fe74d73b33122a2b8ccd0cf83d0 /apps/app_exec.c
parentcaf1740be6e31f306d7650a9135cb42f34717903 (diff)
If no '?' is found in the arguments, don't attempt to continue.
Reported by: blitzrage Fixed by: tilghman Closes issue #11111 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87724 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_exec.c')
-rw-r--r--apps/app_exec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/app_exec.c b/apps/app_exec.c
index 73d534a1b..12b91a488 100644
--- a/apps/app_exec.c
+++ b/apps/app_exec.c
@@ -166,6 +166,11 @@ static int execif_exec(struct ast_channel *chan, void *data)
char *parse = ast_strdupa(data);
AST_NONSTANDARD_APP_ARGS(expr, parse, '?');
+ if (ast_strlen_zero(expr.remainder)) {
+ ast_log(LOG_ERROR, "Usage: ExecIf(<cond>?<appiftrue>(<args>):<appiffalse>(<args))\n");
+ return -1;
+ }
+
AST_NONSTANDARD_APP_ARGS(apps, expr.remainder, ':');
if (apps.t && (truedata = strchr(apps.t, '('))) {