[asterisk-commits] tilghman: branch 1.2 r50987 -
/branches/1.2/apps/app_groupcount.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Jan 15 16:09:03 MST 2007
Author: tilghman
Date: Mon Jan 15 17:09:02 2007
New Revision: 50987
URL: http://svn.digium.com/view/asterisk?view=rev&rev=50987
Log:
Check return value before dereferencing (Bug 8822)
Modified:
branches/1.2/apps/app_groupcount.c
Modified: branches/1.2/apps/app_groupcount.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_groupcount.c?view=diff&rev=50987&r1=50986&r2=50987
==============================================================================
--- branches/1.2/apps/app_groupcount.c (original)
+++ branches/1.2/apps/app_groupcount.c Mon Jan 15 17:09:02 2007
@@ -70,7 +70,8 @@
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);
More information about the asterisk-commits
mailing list