From 94ca9bcf222b45b842555bbb63a9774cb02a725e Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 12 Dec 2019 15:18:47 +0100 Subject: [PATCH] fix potential invalid array access --- lib/src/phy/phch/ra_nbiot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/phy/phch/ra_nbiot.c b/lib/src/phy/phch/ra_nbiot.c index 2fab8d479..f0bb3c3db 100644 --- a/lib/src/phy/phch/ra_nbiot.c +++ b/lib/src/phy/phch/ra_nbiot.c @@ -193,7 +193,7 @@ int srslte_ra_nbiot_get_npusch_tbs(uint32_t i_tbs, uint32_t i_ru) } } -int srslte_ra_n_rep_sib1_nb_idx(srslte_mib_nb_t* mib) +uint32_t srslte_ra_n_rep_sib1_nb_idx(srslte_mib_nb_t* mib) { switch (srslte_ra_n_rep_sib1_nb(mib)) { case 4: @@ -203,7 +203,7 @@ int srslte_ra_n_rep_sib1_nb_idx(srslte_mib_nb_t* mib) case 16: return 2; default: - return SRSLTE_ERROR; + return 0; } }