pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-hnbgw/+/38614?usp=email )
Change subject: ps_rab_ass_fsm: Fix uninitialized ptr access
......................................................................
ps_rab_ass_fsm: Fix uninitialized ptr access
/git/osmo-hnbgw/include/osmocom/hnbgw/context_map.h:211:9: error: 'rab' may be
used uninitialized [-Werror=maybe-uninitialized]
211 | _map_rua_dispatch(MAP, EVENT, MSGB, __FILE__, __LINE__)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/git/osmo-hnbgw/src/osmo-hnbgw/ps_rab_ass_fsm.c:358:9: note: in expansion of macro
'map_rua_dispatch'
358 | map_rua_dispatch(rab->map, MAP_RUA_EV_TX_DIRECT_TRANSFER, msg);
| ^~~~~~~~~~~~~~~~
/git/osmo-hnbgw/src/osmo-hnbgw/ps_rab_ass_fsm.c:297:24: note: 'rab' was declared
here
297 | struct ps_rab *rab;
| ^~~
Change-Id: Ifdcd4c369b35820c5c2beb695392d0b82d4ea34c
---
M src/osmo-hnbgw/ps_rab_ass_fsm.c
1 file changed, 7 insertions(+), 1 deletion(-)
Approvals:
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/src/osmo-hnbgw/ps_rab_ass_fsm.c b/src/osmo-hnbgw/ps_rab_ass_fsm.c
index 456d5aa..f400fcc 100644
--- a/src/osmo-hnbgw/ps_rab_ass_fsm.c
+++ b/src/osmo-hnbgw/ps_rab_ass_fsm.c
@@ -294,7 +294,7 @@
/* See whether all information is in so that we can forward the modified RAB Assignment
Request to RUA. */
static void ps_rab_ass_req_check_local_f_teids(struct ps_rab_ass *rab_ass)
{
- struct ps_rab *rab;
+ struct ps_rab *rab = NULL;
RANAP_RAB_AssignmentRequestIEs_t *ies =
&rab_ass->ranap_rab_ass_req_message->msg.raB_AssignmentRequestIEs;
int i;
struct msgb *msg;
@@ -346,6 +346,12 @@
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_SetupOrModifyItemFirst, &first);
}
+ if (!rab) {
+ LOG_PS_RAB_ASS(rab_ass, LOGL_ERROR, "Lookup PS RAB Assignment Request
failed\n");
+ ps_rab_ass_failure(rab_ass);
+ return;
+ }
+
/* Send the modified RAB Assignment Request to the hNodeB, wait for the RAB Assignment
Response */
msg = ranap_rab_ass_req_encode(ies);
if (!msg) {
--
To view, visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/38614?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Ifdcd4c369b35820c5c2beb695392d0b82d4ea34c
Gerrit-Change-Number: 38614
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>