[asterisk-commits] tilghman: trunk r228015 - /trunk/apps/app_externalivr.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Nov 5 11:08:06 CST 2009


Author: tilghman
Date: Thu Nov  5 11:08:02 2009
New Revision: 228015

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=228015
Log:
Don't crash if no arguments are passed.
(closes issue #16119)
 Reported by: thedavidfactor

Modified:
    trunk/apps/app_externalivr.c

Modified: trunk/apps/app_externalivr.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_externalivr.c?view=diff&rev=228015&r1=228014&r2=228015
==============================================================================
--- trunk/apps/app_externalivr.c (original)
+++ trunk/apps/app_externalivr.c Thu Nov  5 11:08:02 2009
@@ -372,6 +372,11 @@
 
 	u->abort_current_sound = 0;
 	u->chan = chan;
+
+	if (ast_strlen_zero(data)) {
+		ast_log(LOG_WARNING, "ExternalIVR requires a command to execute\n");
+		return -1;
+	}
 
 	buf = ast_strdupa(data);
 	AST_STANDARD_APP_ARGS(eivr_args, buf);




More information about the asterisk-commits mailing list