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
This commit is contained in:
Philipp Maier 2020-09-11 21:26:23 +02:00 committed by laforge
parent 754def9c7d
commit 9194b33ec1
1 changed files with 6 additions and 1 deletions

View File

@ -825,7 +825,12 @@ int gsm48_rx_mm_serv_req(struct msc_a *msc_a, struct msgb *msg)
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 RE-ESTABLISH 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 */