summaryrefslogtreecommitdiff
path: root/apps/app_exec.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2007-10-30 22:15:28 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2007-10-30 22:15:28 +0000
commitf59581126507620190394e8dacfe1bdb1ef9b791 (patch)
treebaa837366b3c3fe74d73b33122a2b8ccd0cf83d0 /apps/app_exec.c
parent3978cb6f1c42af28d40fe13137ecbb091cbf4078 (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: https://origsvn.digium.com/svn/asterisk/trunk@87724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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, '('))) {