fix: eliminate stale verdict poisoning, memory leaks, data races, and per-packet allocations in engine
This commit is contained in:
+4
-1
@@ -59,7 +59,10 @@ func ParseL3(data []byte) (l3 L3Info, transport []byte, ok bool) {
|
||||
return
|
||||
}
|
||||
totalLen := int(uint16(data[2])<<8 | uint16(data[3]))
|
||||
if totalLen < int(ihl)*4 || totalLen > len(data) {
|
||||
if totalLen < int(ihl)*4 {
|
||||
return
|
||||
}
|
||||
if totalLen > len(data) {
|
||||
totalLen = len(data)
|
||||
}
|
||||
return L3Info{
|
||||
|
||||
Reference in New Issue
Block a user