From 4085349be35c18358c16bc8d74ee0817fb2b0899 Mon Sep 17 00:00:00 2001 From: SAWADA Kentaro Date: Tue, 28 May 2019 19:31:53 +0900 Subject: [PATCH] Fix Coverity Scan CID 340276 --- openair2/F1AP/f1ap_handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/F1AP/f1ap_handlers.c b/openair2/F1AP/f1ap_handlers.c index a5b6a09963..12aba18a9d 100644 --- a/openair2/F1AP/f1ap_handlers.c +++ b/openair2/F1AP/f1ap_handlers.c @@ -98,7 +98,7 @@ int f1ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream, } /* Checking procedure Code and direction of message */ - if (pdu.choice.initiatingMessage->procedureCode > sizeof(f1ap_messages_callback) / (3 * sizeof( + if (pdu.choice.initiatingMessage->procedureCode >= sizeof(f1ap_messages_callback) / (3 * sizeof( f1ap_message_decoded_callback)) || (pdu.present > F1AP_F1AP_PDU_PR_unsuccessfulOutcome)) { LOG_E(F1AP, "[SCTP %d] Either procedureCode %ld or direction %d exceed expected\n",