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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 12 15:41:01 CST 2009


Author: russell
Date: Thu Feb 12 15:41:01 2009
New Revision: 175368

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=175368
Log:
Remove useless string copy, and make sscanf safe again

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=175368&r1=175367&r2=175368
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu Feb 12 15:41:01 2009
@@ -7671,7 +7671,6 @@
 	iterator = req->sdp_start;
 	while ((a = get_sdp_iterate(&iterator, req, "a"))[0] != '\0') {
 		char mimeSubtype[128];
-		ast_copy_string(mimeSubtype, a, sizeof(mimeSubtype));
 		if (option_debug > 1) {
 			int breakout = FALSE;
 		
@@ -7759,7 +7758,7 @@
 			}
 			red_cp = red_fmtp;
 
-		} else if (sscanf(a, "rtpmap: %u %[^/]/", &codec, mimeSubtype) == 2) {
+		} else if (sscanf(a, "rtpmap: %u %127[^/]/", &codec, mimeSubtype) == 2) {
 			/* We have a rtpmap to handle */
 
 			if (last_rtpmap_codec < SDP_MAX_RTPMAP_CODECS) {




More information about the asterisk-commits mailing list