Fix Coverity Scan CID 339932 (Overrunning array messages_callback of 48 24-byte elements at element index 48 (byte offset 1152) using index pdu.choice.initiatingMessage.procedureCode (which evaluates to 48).)
This commit is contained in:
@@ -220,7 +220,7 @@ int s1ap_eNB_handle_message(uint32_t assoc_id, int32_t stream,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Checking procedure Code and direction of message */
|
/* Checking procedure Code and direction of message */
|
||||||
if (pdu.choice.initiatingMessage.procedureCode > sizeof(messages_callback) / (3 * sizeof(
|
if (pdu.choice.initiatingMessage.procedureCode >= sizeof(messages_callback) / (3 * sizeof(
|
||||||
s1ap_message_decoded_callback))
|
s1ap_message_decoded_callback))
|
||||||
|| (pdu.present > S1AP_S1AP_PDU_PR_unsuccessfulOutcome)) {
|
|| (pdu.present > S1AP_S1AP_PDU_PR_unsuccessfulOutcome)) {
|
||||||
S1AP_ERROR("[SCTP %d] Either procedureCode %ld or direction %d exceed expected\n",
|
S1AP_ERROR("[SCTP %d] Either procedureCode %ld or direction %d exceed expected\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user