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 <pma...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to