diff --git a/server/handler/payload_tcp_parser.go b/server/handler/payload_tcp_parser.go index cd0e581..6d3c4cc 100644 --- a/server/handler/payload_tcp_parser.go +++ b/server/handler/payload_tcp_parser.go @@ -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])