mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Merge pull request #2426 from JacobBarthelmeh/Fuzzer
sanity check on buffer size before reading short
This commit is contained in:
@ -8024,6 +8024,8 @@ static int TLSX_PreSharedKey_Parse(WOLFSSL* ssl, byte* input, word16 length,
|
||||
list = (PreSharedKey*)extension->data;
|
||||
|
||||
/* Length of binders. */
|
||||
if (idx + OPAQUE16_LEN > length)
|
||||
return BUFFER_E;
|
||||
ato16(input + idx, &len);
|
||||
idx += OPAQUE16_LEN;
|
||||
if (len < MIN_PSK_BINDERS_LEN || length - idx < len)
|
||||
|
Reference in New Issue
Block a user