internal.c: don't check TLS13 plaintext limit twice

Plaintext size is checked before decryption in TLS 1.3
This commit is contained in:
Marco Oliverio
2022-05-10 12:39:11 +02:00
parent 0c7e9a0104
commit 445c1e6ceb

View File

@ -17410,7 +17410,9 @@ int ProcessReplyEx(WOLFSSL* ssl, int allowSocketErr)
}
else
#endif
if (ssl->buffers.inputBuffer.length -
/* TLS13 plaintext limit is checked earlier before decryption */
if (!IsAtLeastTLSv1_3(ssl->version)
&& ssl->buffers.inputBuffer.length -
ssl->keys.padSz -
ssl->buffers.inputBuffer.idx > MAX_PLAINTEXT_SZ
#ifdef WOLFSSL_ASYNC_CRYPT