mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 21:30:48 +02:00
Send alert in case of decrypted all-zero message
This commit is contained in:
@@ -22395,6 +22395,11 @@ static int removeMsgInnerPadding(WOLFSSL* ssl)
|
||||
|
||||
/* Get the real content type from the end of the data. */
|
||||
ssl->curRL.type = ssl->buffers.inputBuffer.buffer[i];
|
||||
if (ssl->curRL.type == 0) {
|
||||
SendAlert(ssl, alert_fatal, unexpected_message);
|
||||
WOLFSSL_ERROR(PARSE_ERROR);
|
||||
return PARSE_ERROR;
|
||||
}
|
||||
/* consider both contentType byte and MAC as padding */
|
||||
ssl->keys.padSz = ssl->buffers.inputBuffer.idx
|
||||
+ ssl->curSize - i;
|
||||
|
||||
Reference in New Issue
Block a user