From 710cfe4244a5991f290d24b1ea4a052738865531 Mon Sep 17 00:00:00 2001 From: lanrenwo Date: Thu, 12 Jan 2023 10:25:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DsniNewParser=E5=88=87?= =?UTF-8?q?=E7=89=87=E8=B6=8A=E7=95=8C=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/handler/payload_tcp_parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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])