mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
sanity check on buffer size
This commit is contained in:
@ -10133,6 +10133,11 @@ int TLSX_ParseVersion(WOLFSSL* ssl, byte* input, word16 length, byte msgType,
|
|||||||
word16 type;
|
word16 type;
|
||||||
word16 size;
|
word16 size;
|
||||||
|
|
||||||
|
if (offset + (2 * OPAQUE16_LEN) > length) {
|
||||||
|
ret = BUFFER_ERROR;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
ato16(input + offset, &type);
|
ato16(input + offset, &type);
|
||||||
offset += HELLO_EXT_TYPE_SZ;
|
offset += HELLO_EXT_TYPE_SZ;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user