diff options
-rw-r--r-- | apps/app_exec.c | 5 |
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, '('))) { |