From 29081f0a16fcf4c5b2216bdef6411b22dbf6d026 Mon Sep 17 00:00:00 2001
From: Dong Anyuan <donganyuan@cn.fujitsu.com>
Date: Tue, 28 May 2019 21:37:30 +0900
Subject: [PATCH] Fix Coverity Scan CID 300431 (Overrunning array
 pdu_info_pP->li_list of 128 2-byte elements at element index 128 (byte offset
 256) using index pdu_info_pP->num_li (which evaluates to 128).)

---
 openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c
index 18db23eb55..a0569b7f00 100644
--- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c
+++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c
@@ -112,7 +112,7 @@ signed int rlc_um_get_pdu_infos(
       //             PROTOCOL_RLC_UM_CTXT_FMT"[GET PDU INFO]  SN %04d TOO MANY LIs ",
       //             PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
       //             pdu_info_pP->sn);
-      if(pdu_info_pP->num_li > RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU) {
+      if(pdu_info_pP->num_li >= RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU) {
         LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[GET PDU INFO]  SN %04d TOO MANY LIs \n",
                    PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
                    pdu_info_pP->sn);
-- 
2.26.2