Change in ...osmo-msc[master]: gsm48_tch_rtp_create(): check against NULL mgcp_info

neels gerrit-no-reply at lists.osmocom.org
Thu Aug 29 23:16:34 UTC 2019


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/15344


Change subject: gsm48_tch_rtp_create(): check against NULL mgcp_info
......................................................................

gsm48_tch_rtp_create(): check against NULL mgcp_info

osmo_mgcpc_ep_ci_get_rtp_info() might return a NULL mgcp_info, guard against
that.

Fixes: CID#203651
Change-Id: I98fe5860c49751ade1af10d99487aba259504f23
---
M src/libmsc/gsm_04_08_cc.c
1 file changed, 4 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/44/15344/1

diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index 1ec3342..e83caa2 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -1700,7 +1700,10 @@
 
 	/* Payload Type number */
 	mgcp_info = osmo_mgcpc_ep_ci_get_rtp_info(rtp_cn->ci);
-	payload_type = map_codec_to_pt(mgcp_info->ptmap, mgcp_info->ptmap_len, rtp_cn->codec);
+	if (mgcp_info && mgcp_info->ptmap_len)
+		payload_type = map_codec_to_pt(mgcp_info->ptmap, mgcp_info->ptmap_len, rtp_cn->codec);
+	else
+		payload_type = rtp_cn->codec;
 
 	rtp_cn_local = call_leg_local_ip(cl, RTP_TO_CN);
 	if (!rtp_cn_local) {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15344
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I98fe5860c49751ade1af10d99487aba259504f23
Gerrit-Change-Number: 15344
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190829/d1f1560c/attachment.html>


More information about the gerrit-log mailing list