From 29f3f92a24a0254e78dc89b20824fd012ac1f2b4 Mon Sep 17 00:00:00 2001 From: russell Date: Thu, 25 Jan 2007 00:39:50 +0000 Subject: Fix a seg fault when running this application with no arguments from AGI. (issue #8905, junky) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@52137 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_groupcount.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apps/app_groupcount.c') diff --git a/apps/app_groupcount.c b/apps/app_groupcount.c index e44451370..87d313209 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); -- cgit v1.2.3