From: Tilghman Lesher Date: Thu, 5 Nov 2009 17:08:02 +0000 (+0000) Subject: Don't crash if no arguments are passed. X-Git-Tag: 11.0.0-beta1~3912 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ee06c6c3bb89d065b9c210ffe7842e34e0cbab5;p=thirdparty%2Fasterisk.git Don't crash if no arguments are passed. (closes issue #16119) Reported by: thedavidfactor git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@228015 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c index 7258181750..2f64fb26b7 100644 --- a/apps/app_externalivr.c +++ b/apps/app_externalivr.c @@ -373,6 +373,11 @@ static int app_exec(struct ast_channel *chan, const char *data) 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);