diff options
authorPau Espin Pedrol <pespin@sysmocom.de>2022-06-29 18:23:38 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2022-06-29 18:23:44 +0200
commite6cecee78c5a31f810d12eae485adb75e74aeed2 (patch)
parent1032df2d887919537477ab20433e5549731b6cfc (diff)
xua_snm: assert to guard against NULL ptrHEADmaster
This is similarly done for same IE in other functions, so let's do it here too in order to make coverity happy, and avoid random access ptr probably ending up in obscure crash. Fixes: Coverity CID#272994 Change-Id: I72059ffaa608bb4f5c4bd274645878e0b31ed6e0
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xua_snm.c b/src/xua_snm.c
index 1212162..c7d0d2e 100644
--- a/src/xua_snm.c
+++ b/src/xua_snm.c
@@ -464,6 +464,8 @@ void xua_snm_rx_scon(struct osmo_ss7_asp *asp, struct osmo_ss7_as *as, struct xu
const uint32_t *cong_level = xua_msg_get_u32p(xua, M3UA_IEI_CONG_IND, &_cong_level);
int log_ss = osmo_ss7_asp_get_log_subsys(asp);
+ OSMO_ASSERT(ie_aff_pc);
LOGPASP(asp, log_ss, LOGL_NOTICE, "RX SCON(%s) for %s level=%u\n", info_str ? info_str : "",
format_affected_pcs_c(xua, asp->inst, ie_aff_pc), cong_level ? *cong_level : 0);