mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
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
This commit is contained in:
@@ -166,6 +166,11 @@ static int execif_exec(struct ast_channel *chan, void *data)
|
|||||||
char *parse = ast_strdupa(data);
|
char *parse = ast_strdupa(data);
|
||||||
|
|
||||||
AST_NONSTANDARD_APP_ARGS(expr, parse, '?');
|
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, ':');
|
AST_NONSTANDARD_APP_ARGS(apps, expr.remainder, ':');
|
||||||
|
|
||||||
if (apps.t && (truedata = strchr(apps.t, '('))) {
|
if (apps.t && (truedata = strchr(apps.t, '('))) {
|
||||||
|
Reference in New Issue
Block a user