From 8c0db8086d521322fbdcd83391fc7b2831cdc17b Mon Sep 17 00:00:00 2001 From: Dong Anyuan Date: Tue, 28 May 2019 20:31:03 +0900 Subject: [PATCH] Fix Coverity Scan CID 339892 (Overrunning array msg_p->ittiMsg.rrc_mac_ccch_data_ind.sdu of 512 bytes by passing it to a function which accesses it at byte offset 1022 using argument msg_p->ittiMsg.rrc_mac_ccch_data_ind.sdu_size (which evaluates to 1023).) --- openair2/RRC/LTE/rrc_eNB.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 4ee71c13be..b8d94bf3af 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -7736,9 +7736,9 @@ void *rrc_enb_process_itti_msg(void *notUsed) { &ctxt, RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size); - if (RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size >= RRC_BUFFER_SIZE_MAX) { + if (RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size >= CCCH_SDU_SIZE) { LOG_I(RRC, "CCCH message has size %d > %d\n", - RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size,RRC_BUFFER_SIZE_MAX); + RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size,CCCH_SDU_SIZE); break; }