[asterisk-commits] oej: trunk r132823 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 23 03:13:08 CDT 2008


Author: oej
Date: Wed Jul 23 03:13:07 2008
New Revision: 132823

URL: http://svn.digium.com/view/asterisk?view=rev&rev=132823
Log:
Well, the content of a channel variable may be longer than the size of a pointer...
Thanks, eliel!

Reported by: eliel
Patches: 
      chan_siptrunk.SIPPEER.patch uploaded by eliel (license 64)
(closes issue #13135)

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=132823&r1=132822&r2=132823
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Jul 23 03:13:07 2008
@@ -14867,7 +14867,7 @@
 		chanvar = strsep(&chanvar, "]");
 		for (v = peer->chanvars ; v ; v = v->next)
 			if (strcasecmp(v->name, chanvar) == 0)
-				ast_copy_string(buf, v->value, sizeof(buf));
+				ast_copy_string(buf, v->value, len);
 	} else  if (!strncasecmp(colname, "codec[", 6)) {
 		char *codecnum;
 		int index = 0, codec = 0;




More information about the asterisk-commits mailing list