mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Merge pull request #3908 from embhorn/zd11866
Sanity check size in TLSX_Parse
This commit is contained in:
@ -11049,7 +11049,7 @@ int TLSX_Parse(WOLFSSL* ssl, const byte* input, word16 length, byte msgType,
|
|||||||
ato16(input + offset, &size);
|
ato16(input + offset, &size);
|
||||||
offset += OPAQUE16_LEN;
|
offset += OPAQUE16_LEN;
|
||||||
|
|
||||||
if (offset + size > length)
|
if (length - offset < size)
|
||||||
return BUFFER_ERROR;
|
return BUFFER_ERROR;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
Reference in New Issue
Block a user