summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-04-27 12:11:24 +0200
committerHarald Welte <laforge@gnumonks.org>2017-04-27 12:11:24 +0200
commitb30b011e34c1b8faa1e797be5df3ef2177945f48 (patch)
tree0e62929850da23d6196f9a74781cc442eb218c4b
parent6fa19331784dabd49eba9778e3fe1ad0d60d340c (diff)
m3ua_decode_notify(): Ensure status_ie is valid before using it
Change-Id: I3cdd0fbdffcbeeb68dbc979385de045220ea0b0c Fixes: coverity CID#166939
-rw-r--r--src/m3ua.c4
1 files changed, 4 insertions, 0 deletions
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);