From da9d08c94e7709f6fae0c64e7597472334826c2d Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Tue, 7 Jun 2022 22:20:01 +0200 Subject: [PATCH] allow calling rua_to_scu() without data There can be SCCP primitives without payload data, e.g. an "empty" SCCP Connection Request. Patch 'mgw_fsm: add MGW support to osmo-hnbgw' added RANAP message decoding that lacks a guard against NULL data. Fix that: do not try to decode NULL data. Related: SYS#5968 Change-Id: Id755e769e82ace7203460ea1b3c847c2c90d41bf --- src/osmo-hnbgw/hnbgw_rua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osmo-hnbgw/hnbgw_rua.c b/src/osmo-hnbgw/hnbgw_rua.c index 1943ac0..00ac09e 100644 --- a/src/osmo-hnbgw/hnbgw_rua.c +++ b/src/osmo-hnbgw/hnbgw_rua.c @@ -271,7 +271,7 @@ static int rua_to_scu(struct hnb_context *hnb, } /* Intercept RAB Assignment Response, inform MGW FSM. */ - if (map && !map->is_ps && !release_context_map) { + if (data && len && map && !map->is_ps && !release_context_map) { message = talloc_zero(map, ranap_message); rc = ranap_cn_rx_co_decode(map, message, msgb_l2(prim->oph.msg), msgb_l2len(prim->oph.msg));