m3ua_decode_notify(): Ensure status_ie is valid before using it

Change-Id: I3cdd0fbdffcbeeb68dbc979385de045220ea0b0c
Fixes: coverity CID#166939
This commit is contained in:
Harald Welte 2017-04-27 12:11:24 +02:00
parent 6fa1933178
commit b30b011e34
1 changed files with 4 additions and 0 deletions

View File

@ -412,6 +412,10 @@ int m3ua_decode_notify(struct osmo_xlm_prim_notify *npar, void *ctx,
/* cannot use xua_msg_get_u32() as it does endian conversion */
status_ie = xua_msg_find_tag(xua, M3UA_IEI_STATUS);
if (!status_ie) {
LOGP(DLM3UA, LOGL_ERROR, "M3UA NOTIFY without Status IE\n");
return -1;
}
status = *(uint32_t *) status_ie->dat;
aspid_ie = xua_msg_find_tag(xua, M3UA_IEI_ASP_ID);