mirror of
https://github.com/openobserve/goflow2.git
synced 2025-10-25 17:14:05 +00:00
Merge pull request #65 from netsampler/bugfix/offset
Bugfix: index out of range in some cases
This commit is contained in:
@@ -172,7 +172,7 @@ func ParseEthernetHeader(flowMessage *flowmessage.FlowMessage, data []byte, conf
|
|||||||
appOffset = 8
|
appOffset = 8
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(data) >= offset+13 && nextHeader == 6 {
|
if len(data) > offset+13 && nextHeader == 6 {
|
||||||
tcpflags = data[offset+13]
|
tcpflags = data[offset+13]
|
||||||
|
|
||||||
appOffset = int(data[13]>>4) * 4
|
appOffset = int(data[13]>>4) * 4
|
||||||
|
|||||||
Reference in New Issue
Block a user