[sr-dev] git:master: modules_k/rtpproxy: fix crash related to SDP without ssession IP

Ovidiu Sas osas at voipembedded.com
Mon Sep 13 20:58:28 CEST 2010


Module: sip-router
Branch: master
Commit: e017bd9c00a021c1f2fe0b69bb5382d69afd5e7d
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e017bd9c00a021c1f2fe0b69bb5382d69afd5e7d

Author: Ovidiu Sas <osas at voipembedded.com>
Committer: Ovidiu Sas <osas at voipembedded.com>
Date:   Mon Sep 13 15:03:57 2010 -0400

modules_k/rtpproxy: fix crash related to SDP without ssession IP

 - when the IP address is provided only in the SDP stream description
and not in the SDP session description, the rtpproxy module was crashing
due to wrong check of the IP address length.
 - thanks to Daniel Constantin Mierla for reporting and investigating this.

---

 modules_k/rtpproxy/rtpproxy.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules_k/rtpproxy/rtpproxy.c b/modules_k/rtpproxy/rtpproxy.c
index f526581..daee003 100644
--- a/modules_k/rtpproxy/rtpproxy.c
+++ b/modules_k/rtpproxy/rtpproxy.c
@@ -2074,7 +2074,7 @@ force_rtp_proxy(struct sip_msg* msg, char* str1, char* str2, int offer)
 			sdp_stream = get_sdp_stream(msg, sdp_session_num, sdp_stream_num);
 			if(!sdp_stream) break;
 
-			if (sdp_stream->ip_addr.s && !sdp_stream->ip_addr.len) {
+			if (sdp_stream->ip_addr.s && sdp_stream->ip_addr.len>0) {
 				oldip = sdp_stream->ip_addr;
 				pf = sdp_stream->pf;
 			} else {




More information about the sr-dev mailing list