Change in osmo-msc[master]: gsm_04_08: check return code of osmo_mobile_identity_decode_from_l3()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Fri Sep 11 19:32:03 UTC 2020


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/20093 )


Change subject: gsm_04_08: check return code of osmo_mobile_identity_decode_from_l3()
......................................................................

gsm_04_08: check return code of osmo_mobile_identity_decode_from_l3()

The function gsm48_rx_cm_reest_req() is the only one where the return
code of osmo_mobile_identity_decode_from_l3() is not checked, lets check
it here too.

Change-Id: I37981205870b094b3a40a20197461208daa62698
Fixes: CID#211037
---
M src/libmsc/gsm_04_08.c
1 file changed, 6 insertions(+), 1 deletion(-)



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

diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 6bd82d0..e313bfd 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -825,7 +825,12 @@
 static int gsm48_rx_cm_reest_req(struct msc_a *msc_a, struct msgb *msg)
 {
 	struct osmo_mobile_identity mi;
-	osmo_mobile_identity_decode_from_l3(&mi, msg, false);
+	int rc = osmo_mobile_identity_decode_from_l3(&mi, msg, false);
+	if (rc) {
+		LOGP(DMM, LOGL_ERROR, "CM ESTABLISHMENT REQUEST: cannot decode Mobile Identity\n");
+		return -EINVAL;
+	}
+
 	DEBUGP(DMM, "<- CM RE-ESTABLISH REQUEST %s\n", osmo_mobile_identity_to_str_c(OTC_SELECT, &mi));
 
 	/* we don't support CM call re-establishment */

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I37981205870b094b3a40a20197461208daa62698
Gerrit-Change-Number: 20093
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200911/2535acad/attachment.htm>


More information about the gerrit-log mailing list