Merge pull request #2381 from SparkiDev/tls13_sv
Check suite size length is valid as well as space for compression
This commit is contained in:
commit
c400c38588
@ -3880,6 +3880,8 @@ static int DoTls13SupportedVersions(WOLFSSL* ssl, const byte* input, word32 i,
|
|||||||
return BUFFER_ERROR;
|
return BUFFER_ERROR;
|
||||||
ato16(input + i, &suiteSz);
|
ato16(input + i, &suiteSz);
|
||||||
i += OPAQUE16_LEN;
|
i += OPAQUE16_LEN;
|
||||||
|
if (i + suiteSz + 1 > helloSz)
|
||||||
|
return BUFFER_ERROR;
|
||||||
i += suiteSz;
|
i += suiteSz;
|
||||||
/* Compression */
|
/* Compression */
|
||||||
b = input[i++];
|
b = input[i++];
|
||||||
|
Loading…
Reference in New Issue
Block a user