mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 15:56:43 +08:00
修复sniNewParser的panic
This commit is contained in:
@@ -32,6 +32,9 @@ func sniNewParser(b []byte) (uint8, string) {
|
|||||||
if len(b) < 2 || b[0] != 0x16 || b[1] != 0x03 {
|
if len(b) < 2 || b[0] != 0x16 || b[1] != 0x03 {
|
||||||
return acc_proto_tcp, ""
|
return acc_proto_tcp, ""
|
||||||
}
|
}
|
||||||
|
if len(b) < 6 {
|
||||||
|
return acc_proto_tcp, ""
|
||||||
|
}
|
||||||
rest := b[5:]
|
rest := b[5:]
|
||||||
restLen := len(rest)
|
restLen := len(rest)
|
||||||
if restLen == 0 {
|
if restLen == 0 {
|
||||||
|
Reference in New Issue
Block a user