소스 검색

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.
Ovidiu Sas 15 년 전
부모
커밋
e017bd9c00
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      modules_k/rtpproxy/rtpproxy.c

+ 1 - 1
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 {