From 4ab9c49a1372c795b6fac7723bbb05b82d9e1ea2 Mon Sep 17 00:00:00 2001 From: Dong Anyuan Date: Thu, 20 Jun 2019 10:44:05 +0900 Subject: [PATCH] Fix Coverity Scan CID 300464 (Using hi as an array. This might corrupt or misinterpret adjacent memory locations.) --- openair2/LAYER2/MAC/eNB_scheduler_primitives.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index 0385ae6730..3e58204659 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -5140,8 +5140,8 @@ nack_or_dtx_reported(COMMON_channels_t *cc, if (cc->tdd_Config) { nfapi_harq_indication_tdd_rel13_t *hi = &harq_pdu->harq_indication_tdd_rel13; - for (i = 0; i < hi->number_of_ack_nack; hi++) { - if (hi->harq_data[0].bundling.value_0 != 1) //only bundling is used for tdd for now + for (i = 0; i < hi->number_of_ack_nack; i++) { + if (hi->harq_data[i].bundling.value_0 != 1) //only bundling is used for tdd for now return 1; } @@ -5150,7 +5150,7 @@ nack_or_dtx_reported(COMMON_channels_t *cc, nfapi_harq_indication_fdd_rel13_t *hi = &harq_pdu->harq_indication_fdd_rel13; - for (i = 0; i < hi->number_of_ack_nack; hi++) { + for (i = 0; i < hi->number_of_ack_nack; i++) { if (hi->harq_tb_n[i] != 1) return 1; }