Commit 1f55e5f6 authored by luis_pereira87's avatar luis_pereira87

Fix Msg4 segmentation fault when UE_id is invalid

parent 5f79ab93
...@@ -1412,6 +1412,12 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1412,6 +1412,12 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
} }
int UE_id = find_nr_UE_id(module_idP, ra->rnti); int UE_id = find_nr_UE_id(module_idP, ra->rnti);
if (UE_id < 0) {
mac_remove_nr_ue(module_idP, tc_rnti);
nr_clear_ra_proc(module_idP, CC_id, frameP, ra);
return;
}
NR_UE_info_t *UE_info = &nr_mac->UE_info; NR_UE_info_t *UE_info = &nr_mac->UE_info;
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment