vlr_subscr_rx_id_resp(): dont assert on received MI type
The Mobile Identity type is received on the wire, we asserting on its type
constitutes a DoS vector.
Change-Id: I2b2e25ef8e878e91a165018ba49f1609cfb5cbd0
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index 887ceb8..019e657 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -1146,6 +1146,8 @@
case GSM_MI_TYPE_IMEISV:
vlr_subscr_set_imeisv(vsub, mi_string);
break;
+ default:
+ return -EINVAL;
}
if (vsub->auth_fsm) {
@@ -1170,8 +1172,7 @@
event = VLR_ULA_E_ID_IMEISV;
break;
default:
- OSMO_ASSERT(0);
- break;
+ return -EINVAL;
}
osmo_fsm_inst_dispatch(vsub->lu_fsm, event, mi_string);
}