Ensure the SNI extension has at least OPAQUE16_LEN bytes in TLSX_SNI_GetFromBuffer.

Thanks to Zou Dikai for the report.
This commit is contained in:
Kareem
2026-04-06 12:42:35 -07:00
parent 48a0347581
commit 36931c8b98
+3
View File
@@ -2800,6 +2800,9 @@ int TLSX_SNI_GetFromBuffer(const byte* clientHello, word32 helloSz,
} else {
word16 listLen;
if (extLen < OPAQUE16_LEN)
return BUFFER_ERROR;
ato16(clientHello + offset, &listLen);
offset += OPAQUE16_LEN;