[asterisk-commits] file: trunk r351506 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 19 15:13:06 CST 2012


Author: file
Date: Thu Jan 19 15:13:02 2012
New Revision: 351506

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=351506
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
........

Merged revisions 351504 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 351505 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=351506&r1=351505&r2=351506
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu Jan 19 15:13:02 2012
@@ -30275,6 +30275,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 asterisk-commits mailing list