summaryrefslogtreecommitdiff
path: root/funcs/func_groupcount.c
diff options
context:
space:
mode:
authorDavid Vossel <dvossel@digium.com>2009-12-02 15:42:54 +0000
committerDavid Vossel <dvossel@digium.com>2009-12-02 15:42:54 +0000
commitec98fba3ad35c328111ea78a3fb84dca5e3ee4c6 (patch)
treeb4200619e3bdbd7e3a4a0d79de098f5422797bf3 /funcs/func_groupcount.c
parent23781604aa3cf1ddb356570e4c0bd8fefe1e8940 (diff)
Merged revisions 232268 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r232268 | dvossel | 2009-12-02 09:41:36 -0600 (Wed, 02 Dec 2009) | 9 lines 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/trunk@232269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs/func_groupcount.c')
-rw-r--r--funcs/func_groupcount.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/funcs/func_groupcount.c b/funcs/func_groupcount.c
index 81c4c97c9..4ee88a882 100644
--- a/funcs/func_groupcount.c
+++ b/funcs/func_groupcount.c
@@ -196,6 +196,10 @@ static int group_function_write(struct ast_channel *chan, const char *cmd,
{
char grpcat[256];
+ if (!value) {
+ return -1;
+ }
+
if (!ast_strlen_zero(data)) {
snprintf(grpcat, sizeof(grpcat), "%s@%s", value, data);
} else {