mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 08:40:16 +00:00
Fix null pointer dereference in app_groupcount.c (bug 1588)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -68,7 +68,7 @@ static int group_get_count(char *group)
|
|||||||
chan = ast_channel_walk(NULL);
|
chan = ast_channel_walk(NULL);
|
||||||
while(chan) {
|
while(chan) {
|
||||||
test = pbx_builtin_getvar_helper(chan, "GROUP");
|
test = pbx_builtin_getvar_helper(chan, "GROUP");
|
||||||
if (!strcasecmp(test, group))
|
if (test && !strcasecmp(test, group))
|
||||||
count++;
|
count++;
|
||||||
chan = ast_channel_walk(chan);
|
chan = ast_channel_walk(chan);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user