RRCReestablishmentRequest: add input parameters validation

Add defensive parameter checks at the start of
rrc_handle_RRCReestablishmentRequest to prevent NULL pointer
dereferences and invalid assoc_id handling.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
This commit is contained in:
Guido Casati
2026-02-13 14:36:35 +01:00
committed by Guido Casati
parent 2716a5a3dc
commit d568920466

View File

@@ -1437,6 +1437,11 @@ static void rrc_handle_RRCReestablishmentRequest(gNB_RRC_INST *rrc,
const NR_RRCReestablishmentRequest_IEs_t *req,
const f1ap_initial_ul_rrc_message_t *msg)
{
DevAssert(req);
DevAssert(msg);
DevAssert(rrc);
RETURN_IF_INVALID_ASSOC_ID(assoc_id);
uint64_t random_value = 0;
const char *scause = get_reestab_cause(req->reestablishmentCause);
const long physCellId = req->ue_Identity.physCellId;