]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fixes segfault in func_groupcount
authorDavid Vossel <dvossel@digium.com>
Wed, 2 Dec 2009 15:41:36 +0000 (15:41 +0000)
committerDavid Vossel <dvossel@digium.com>
Wed, 2 Dec 2009 15:41:36 +0000 (15:41 +0000)
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

funcs/func_groupcount.c

index 7f6f8937bf104492dab018b27edbdd3b4eff4bd2..b90fe85766a809cf6c64ebf7d5658968b364d355 100644 (file)
@@ -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 {