forked from wolfSSL/wolfssl
internal.c: check that we have data before processing messages
We should never encounter this bug under normal circumstances. But if we enter processReplyEx with a wrongly `ssl->options.processReply` set to `runProcessingOneMessage` we check that we have some data.
This commit is contained in:
@ -17396,6 +17396,10 @@ int ProcessReplyEx(WOLFSSL* ssl, int allowSocketErr)
|
||||
|
||||
/* the record layer is here */
|
||||
case runProcessingOneMessage:
|
||||
/* can't process a message if we have no data. */
|
||||
if (ssl->buffers.inputBuffer.idx
|
||||
>= ssl->buffers.inputBuffer.length)
|
||||
return BUFFER_ERROR;
|
||||
|
||||
#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
|
||||
if (IsEncryptionOn(ssl, 0) && ssl->options.startedETMRead) {
|
||||
|
Reference in New Issue
Block a user