mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-06 13:20:48 +02:00
Confirm sessIdSz's size in DoTls13ServerHello before it is used.
Thanks to Zou Dikai for the report.
This commit is contained in:
+2
-1
@@ -5371,7 +5371,8 @@ int DoTls13ServerHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
||||
|
||||
/* Session id */
|
||||
args->sessIdSz = input[args->idx++];
|
||||
if ((args->idx - args->begin) + args->sessIdSz > helloSz)
|
||||
if (args->sessIdSz > ID_LEN || args->sessIdSz > RAN_LEN ||
|
||||
((args->idx - args->begin) + args->sessIdSz > helloSz))
|
||||
return BUFFER_ERROR;
|
||||
args->sessId = input + args->idx;
|
||||
args->idx += args->sessIdSz;
|
||||
|
||||
Reference in New Issue
Block a user