[asterisk-commits] file: branch 10 r351505 - in /branches/10: ./ channels/chan_sip.c

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


Author: file
Date: Thu Jan 19 15:12:20 2012
New Revision: 351505

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

Modified:
    branches/10/   (props changed)
    branches/10/channels/chan_sip.c

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

Modified: branches/10/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/channels/chan_sip.c?view=diff&rev=351505&r1=351504&r2=351505
==============================================================================
--- branches/10/channels/chan_sip.c (original)
+++ branches/10/channels/chan_sip.c Thu Jan 19 15:12:20 2012
@@ -30139,6 +30139,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