diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-15 23:09:02 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-15 23:09:02 +0000 |
commit | af8e3068d509d0705c0e6b833dcea00aeaf2a831 (patch) | |
tree | c8bb7c6a12b3ecef33ac027d9fbdb2f3d04af0d4 /apps | |
parent | 2f89f4f992638e9a52a2c239dd971ab10ce077ed (diff) |
Check return value before dereferencing (Bug 8822)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@50987 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_groupcount.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/app_groupcount.c b/apps/app_groupcount.c index 07c07835c..e44451370 100644 --- a/apps/app_groupcount.c +++ b/apps/app_groupcount.c @@ -70,7 +70,8 @@ static int group_count_exec(struct ast_channel *chan, void *data) if (ast_strlen_zero(group)) { 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); |