mirror of https://github.com/bjdgyc/anylink.git
Merge pull request #134 from lanrenwo/patch-1
修复panic: runtime error: index out of range [12] with length 10
This commit is contained in:
commit
89e1828b5e
|
@ -17,6 +17,9 @@ var (
|
|||
)
|
||||
|
||||
func onTCP(payload []byte) (uint8, string) {
|
||||
if len(payload) < 13 {
|
||||
return acc_proto_tcp, ""
|
||||
}
|
||||
ihl := (payload[12] & 0xf0) >> 2
|
||||
data := payload[ihl:]
|
||||
for _, parser := range tcpParsers {
|
||||
|
|
Loading…
Reference in New Issue