mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
when removing the padding for the TLS13 verify message
step, check that the index doesn't wrap around due to a malformed packet
This commit is contained in:
@ -21166,7 +21166,8 @@ default:
|
||||
word16 i = (word16)(ssl->buffers.inputBuffer.idx +
|
||||
ssl->curSize - ssl->specs.aead_mac_size);
|
||||
|
||||
if (i > ssl->buffers.inputBuffer.length) {
|
||||
/* check i isn't too big and won't wrap around on --i */
|
||||
if (i > ssl->buffers.inputBuffer.length || i == 0) {
|
||||
WOLFSSL_ERROR(BUFFER_ERROR);
|
||||
return BUFFER_ERROR;
|
||||
}
|
||||
|
Reference in New Issue
Block a user