修复sniNewParser切片越界的问题

This commit is contained in:
lanrenwo 2023-01-12 10:25:07 +08:00
parent d5205c74cf
commit 710cfe4244
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ func sniNewParser(b []byte) (uint8, string) {
sessionIDLength := int(rest[current])
current += 1
current += sessionIDLength
if current >= restLen {
if current+1 >= restLen {
return acc_proto_https, ""
}
cipherSuiteLength := (int(rest[current]) << 8) + int(rest[current+1])