From: Russell Bryant Date: Thu, 25 Jan 2007 00:39:50 +0000 (+0000) Subject: Fix a seg fault when running this application with no arguments from AGI. X-Git-Tag: 1.2.15~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5823b29f58adaf3826f73946185da4aba6e343be;p=thirdparty%2Fasterisk.git Fix a seg fault when running this application with no arguments from AGI. (issue #8905, junky) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52137 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_groupcount.c b/apps/app_groupcount.c index e44451370f..87d313209e 100644 --- a/apps/app_groupcount.c +++ b/apps/app_groupcount.c @@ -155,6 +155,11 @@ static int group_check_exec(struct ast_channel *chan, void *data) deprecation_warning = 1; } + if (ast_strlen_zero(data)) { + ast_log(LOG_WARNING, "CheckGroup requires an argument(max[@category][|options])\n"); + return 0; + } + if (!(parse = ast_strdupa(data))) { ast_log(LOG_WARNING, "Memory Error!\n"); LOCAL_USER_REMOVE(u);