From: David Vossel Date: Wed, 2 Dec 2009 15:41:36 +0000 (+0000) Subject: fixes segfault in func_groupcount X-Git-Tag: 1.4.28-rc1~11^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cfef673d65a818a36eda1e5b1d93d1312d1da18;p=thirdparty%2Fasterisk.git fixes segfault in func_groupcount closes issue #16337) Reported by: Parantido Patches: issue_16337.diff uploaded by dvossel (license 671) Tested by: Parantido, dvossel git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@232268 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/funcs/func_groupcount.c b/funcs/func_groupcount.c index 7f6f8937bf..b90fe85766 100644 --- a/funcs/func_groupcount.c +++ b/funcs/func_groupcount.c @@ -149,6 +149,10 @@ static int group_function_write(struct ast_channel *chan, char *cmd, { char grpcat[256]; + if (!value) { + return -1; + } + if (!ast_strlen_zero(data)) { snprintf(grpcat, sizeof(grpcat), "%s@%s", value, data); } else {