[asterisk-commits] russell: trunk r105589 - /trunk/main/pbx.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 3 22:26:41 CST 2008
Author: russell
Date: Mon Mar 3 22:26:39 2008
New Revision: 105589
URL: http://svn.digium.com/view/asterisk?view=rev&rev=105589
Log:
Use ast_copy_string() instead of strncpy(), and use sizeof() instead of
a magic number
Modified:
trunk/main/pbx.c
Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=105589&r1=105588&r2=105589
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Mon Mar 3 22:26:39 2008
@@ -3623,8 +3623,11 @@
{
struct ast_context *c = NULL;
struct fake_context item;
- strncpy(item.name, context, 256);
+
+ ast_copy_string(item.name, context, sizeof(item.name));
+
ast_rdlock_contexts();
+
c = ast_hashtab_lookup(contexts_tree,&item);
#ifdef NOTNOW
More information about the asterisk-commits
mailing list