mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 07:18:15 +00:00
Check return value before dereferencing (Bug 8822)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@50987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -70,7 +70,8 @@ static int group_count_exec(struct ast_channel *chan, void *data)
|
|||||||
|
|
||||||
if (ast_strlen_zero(group)) {
|
if (ast_strlen_zero(group)) {
|
||||||
grp = pbx_builtin_getvar_helper(chan, category);
|
grp = pbx_builtin_getvar_helper(chan, category);
|
||||||
strncpy(group, grp, sizeof(group) - 1);
|
if (!ast_strlen_zero(grp))
|
||||||
|
ast_copy_string(group, grp, sizeof(group));
|
||||||
}
|
}
|
||||||
|
|
||||||
count = ast_app_group_get_count(group, category);
|
count = ast_app_group_get_count(group, category);
|
||||||
|
|||||||
Reference in New Issue
Block a user