mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Merge pull request #2228 from JacobBarthelmeh/Fuzzer
sanity check on buffer size before copy
This commit is contained in:
@ -3896,6 +3896,11 @@ int DoTls13ClientHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
||||
if (sessIdSz != ID_LEN && sessIdSz != 0)
|
||||
return INVALID_PARAMETER;
|
||||
#endif
|
||||
|
||||
if (sessIdSz + i > helloSz) {
|
||||
return BUFFER_ERROR;
|
||||
}
|
||||
|
||||
ssl->session.sessionIDSz = sessIdSz;
|
||||
if (sessIdSz == ID_LEN) {
|
||||
XMEMCPY(ssl->session.sessionID, input + i, sessIdSz);
|
||||
|
Reference in New Issue
Block a user