[asterisk-commits] file: trunk r400361 - in /trunk: ./ res/res_pjsip_sdp_rtp.c res/res_pjsip_t38.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 3 09:52:26 CDT 2013


Author: file
Date: Thu Oct  3 09:52:24 2013
New Revision: 400361

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=400361
Log:
Fix crashes in res_pjsip_sdp_rtp and res_pjsip_t38 when a stream is rejected and external_media_address is set.

The callback function for changing the media address in streams wrongly assumes that a connection line
will always be present. This is false as no line is present if a stream has been rejected.

(closes issue ASTERISK-22645)
Reported by: Rusty Newton
........

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

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

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Thu Oct  3 09:52:24 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-399305,399307-400181,400194,400196,400205,400217,400227,400236,400245,400254,400256,400265,400268,400270,400281,400284,400286,400291,400303,400312,400316,400318-400319
+/branches/12:1-398558,398560-398577,398579-399305,399307-400181,400194,400196,400205,400217,400227,400236,400245,400254,400256,400265,400268,400270,400281,400284,400286,400291,400303,400312,400316,400318-400319,400360

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=400361&r1=400360&r2=400361
==============================================================================
--- trunk/res/res_pjsip_sdp_rtp.c (original)
+++ trunk/res/res_pjsip_sdp_rtp.c Thu Oct  3 09:52:24 2013
@@ -1097,6 +1097,11 @@
 	char host[NI_MAXHOST];
 	struct ast_sockaddr addr = { { 0, } };
 
+	/* If the stream has been rejected there will be no connection line */
+	if (!stream->conn) {
+		return;
+	}
+
 	ast_copy_pj_str(host, &stream->conn->addr, sizeof(host));
 	ast_sockaddr_parse(&addr, host, PARSE_PORT_FORBID);
 

Modified: trunk/res/res_pjsip_t38.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_t38.c?view=diff&rev=400361&r1=400360&r2=400361
==============================================================================
--- trunk/res/res_pjsip_t38.c (original)
+++ trunk/res/res_pjsip_t38.c Thu Oct  3 09:52:24 2013
@@ -776,6 +776,11 @@
 	char host[NI_MAXHOST];
 	struct ast_sockaddr addr = { { 0, } };
 
+	/* If the stream has been rejected there will be no connection line */
+	if (!stream->conn) {
+		return;
+	}
+
 	ast_copy_pj_str(host, &stream->conn->addr, sizeof(host));
 	ast_sockaddr_parse(&addr, host, PARSE_PORT_FORBID);
 




More information about the asterisk-commits mailing list