[asterisk-commits] tilghman: trunk r87724 - /trunk/apps/app_exec.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Oct 30 17:15:28 CDT 2007
Author: tilghman
Date: Tue Oct 30 17:15:28 2007
New Revision: 87724
URL: http://svn.digium.com/view/asterisk?view=rev&rev=87724
Log:
If no '?' is found in the arguments, don't attempt to continue.
Reported by: blitzrage
Fixed by: tilghman
Closes issue #11111
Modified:
trunk/apps/app_exec.c
Modified: trunk/apps/app_exec.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_exec.c?view=diff&rev=87724&r1=87723&r2=87724
==============================================================================
--- trunk/apps/app_exec.c (original)
+++ trunk/apps/app_exec.c Tue Oct 30 17:15:28 2007
@@ -166,6 +166,11 @@
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, '('))) {
More information about the asterisk-commits
mailing list