Merge pull request #3908 from embhorn/zd11866

Sanity check size in TLSX_Parse
This commit is contained in:
toddouska
2021-04-07 16:34:56 -07:00
committed by GitHub

View File

@ -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) {