[svn-commits] mjordan: trunk r402943 - in /trunk: ./ res/res_pjsip_sdp_rtp.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Nov 21 11:53:41 CST 2013


Author: mjordan
Date: Thu Nov 21 11:53:39 2013
New Revision: 402943

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=402943
Log:
res_pjsip_sdp_rtp: Fix use of uninitialized value in PJSIP

In PJMEDIA, pjmedia_sdp_rtpmap_to_attr will attempt to use the string
rtpmap.param regardless of its length value. Simply setting the length to 0
does not prevent the garbage on the stack in rtpmap.param.ptr from being
formatted in a sprintf call. This patch initializes the string to NULL so that
at the very least, something is provided to the function that is predictable.
........

Merged revisions 402941 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/res/res_pjsip_sdp_rtp.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Thu Nov 21 11:53:39 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-402738,402755,402757,402767,402769,402787,402793,402804,402817,402838,402864,402891,402926,402940
+/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-402738,402755,402757,402767,402769,402787,402793,402804,402817,402838,402864,402891,402926,402940-402941

Modified: trunk/res/res_pjsip_sdp_rtp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_sdp_rtp.c?view=diff&rev=402943&r1=402942&r2=402943
==============================================================================
--- trunk/res/res_pjsip_sdp_rtp.c (original)
+++ trunk/res/res_pjsip_sdp_rtp.c Thu Nov 21 11:53:39 2013
@@ -274,6 +274,7 @@
 	rtpmap.clock_rate = ast_rtp_lookup_sample_rate2(asterisk_format, format, code);
 	pj_strdup2(pool, &rtpmap.enc_name, ast_rtp_lookup_mime_subtype2(asterisk_format, format, code, 0));
 	rtpmap.param.slen = 0;
+	rtpmap.param.ptr = NULL;
 
 	pjmedia_sdp_rtpmap_to_attr(pool, &rtpmap, &attr);
 




More information about the svn-commits mailing list