From b30b011e34c1b8faa1e797be5df3ef2177945f48 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 27 Apr 2017 12:11:24 +0200 Subject: m3ua_decode_notify(): Ensure status_ie is valid before using it Change-Id: I3cdd0fbdffcbeeb68dbc979385de045220ea0b0c Fixes: coverity CID#166939 --- src/m3ua.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/m3ua.c b/src/m3ua.c index b204708..d96bd18 100644 --- a/src/m3ua.c +++ b/src/m3ua.c @@ -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); -- cgit v1.2.3