mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
dtls13: Dtls13ParseUnifiedRecordLayer: add overflow check
This commit is contained in:
@@ -1362,6 +1362,8 @@ int Dtls13ParseUnifiedRecordLayer(WOLFSSL* ssl, const byte* input,
|
|||||||
to create record number xor mask). (draft 43 - Sec 4.2.3) */
|
to create record number xor mask). (draft 43 - Sec 4.2.3) */
|
||||||
if (hdrInfo->recordLength < DTLS13_RN_MASK_SIZE)
|
if (hdrInfo->recordLength < DTLS13_RN_MASK_SIZE)
|
||||||
return LENGTH_ERROR;
|
return LENGTH_ERROR;
|
||||||
|
if (inputSize < idx + DTLS13_RN_MASK_SIZE)
|
||||||
|
return BUFFER_ERROR;
|
||||||
|
|
||||||
ret = Dtls13EncryptDecryptRecordNumber(ssl, seqNum, seqLen, input + idx,
|
ret = Dtls13EncryptDecryptRecordNumber(ssl, seqNum, seqLen, input + idx,
|
||||||
DEPROTECT);
|
DEPROTECT);
|
||||||
|
Reference in New Issue
Block a user