[asterisk-commits] russell: trunk r175295 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 12 14:45:47 CST 2009


Author: russell
Date: Thu Feb 12 14:45:47 2009
New Revision: 175295

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=175295
Log:
Avoid using ast_strdupa() in a loop.

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=175295&r1=175294&r2=175295
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu Feb 12 14:45:47 2009
@@ -7670,7 +7670,8 @@
 	/* XXX This needs to be done per media stream, since it's media stream specific */
 	iterator = req->sdp_start;
 	while ((a = get_sdp_iterate(&iterator, req, "a"))[0] != '\0') {
-		char* mimeSubtype = ast_strdupa(a); /* ensures we have enough space */
+		char mimeSubtype[128];
+		ast_copy_string(mimeSubtype, a, sizeof(mimeSubtype));
 		if (option_debug > 1) {
 			int breakout = FALSE;
 		




More information about the asterisk-commits mailing list