[svn-commits] file: branch 1.8 r351504 - /branches/1.8/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jan 19 15:11:16 CST 2012


Author: file
Date: Thu Jan 19 15:11:12 2012
New Revision: 351504

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=351504
Log:
Prevent crash when an SDP offer is received with an encrypted video stream when support for video is disabled and res_srtp is loaded.

(closes issue ASTERISK-19202)
Reported by: Catalin Sanda

Modified:
    branches/1.8/channels/chan_sip.c

Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=351504&r1=351503&r2=351504
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Thu Jan 19 15:11:12 2012
@@ -29394,6 +29394,12 @@
 
 static int process_crypto(struct sip_pvt *p, struct ast_rtp_instance *rtp, struct sip_srtp **srtp, const char *a)
 {
+	/* If no RTP instance exists for this media stream don't bother processing the crypto line */
+	if (!rtp) {
+		ast_debug(3, "Received offer with crypto line for media stream that is not enabled\n");
+		return FALSE;
+	}
+
 	if (strncasecmp(a, "crypto:", 7)) {
 		return FALSE;
 	}




More information about the svn-commits mailing list