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:
toddouska 2019-07-30 16:04:00 -07:00 committed by GitHub
commit c400c38588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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++];