]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 232269 via svnmerge from
authorDavid Vossel <dvossel@digium.com>
Wed, 2 Dec 2009 15:43:56 +0000 (15:43 +0000)
committerDavid Vossel <dvossel@digium.com>
Wed, 2 Dec 2009 15:43:56 +0000 (15:43 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r232269 | dvossel | 2009-12-02 09:42:54 -0600 (Wed, 02 Dec 2009) | 15 lines

  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/branches/1.6.1@232271 65c4cc65-6c06-0410-ace0-fbb531ad65f3

funcs/func_groupcount.c

index 405e0db32bfa20c833ad14c32940ef3885db3c82..7aaddc5200aa71ef7c601dc791b99ec459be8d9a 100644 (file)
@@ -144,6 +144,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 {