mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-06 15:00:50 +02:00
additional sanity check on alert message size
This commit is contained in:
+2
-1
@@ -22127,7 +22127,8 @@ static int DoAlert(WOLFSSL* ssl, byte* input, word32* inOutIdx, int* type)
|
||||
dataSz -= ssl->keys.padSz;
|
||||
|
||||
/* make sure can read the message */
|
||||
if (dataSz != ALERT_SIZE) {
|
||||
if (dataSz != ALERT_SIZE ||
|
||||
*inOutIdx + ALERT_SIZE > ssl->buffers.inputBuffer.length) {
|
||||
#ifdef WOLFSSL_EXTRA_ALERTS
|
||||
SendAlert(ssl, alert_fatal, unexpected_message);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user