From b3d11af32d76ecd5fe612257196d2b37cabd0409 Mon Sep 17 00:00:00 2001 From: Francisco Date: Fri, 29 Oct 2021 11:57:51 +0100 Subject: [PATCH] nr,gnb,mac: fix access to uninit array in MAC UE NR metrics read --- srsenb/src/stack/mac/nr/ue_nr.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/srsenb/src/stack/mac/nr/ue_nr.cc b/srsenb/src/stack/mac/nr/ue_nr.cc index 9a8a7c245..3d416d014 100644 --- a/srsenb/src/stack/mac/nr/ue_nr.cc +++ b/srsenb/src/stack/mac/nr/ue_nr.cc @@ -229,9 +229,8 @@ void ue_nr::metrics_read(mac_ue_metrics_t* metrics_) ue_metrics.dl_buffer = dl_buffer; // set PCell sector id - std::array cc_list; //= sched->get_enb_ue_cc_map(rnti); - auto it = std::find(cc_list.begin(), cc_list.end(), 0); - ue_metrics.cc_idx = std::distance(cc_list.begin(), it); + // TODO: use ue_cfg when multiple NR carriers are supported + ue_metrics.cc_idx = 0; *metrics_ = ue_metrics; phr_counter = 0;