mirror of
https://github.com/netsampler/goflow2.git
synced 2024-05-06 15:54:52 +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
|
||||
}
|
||||
|
||||
if len(data) >= offset+13 && nextHeader == 6 {
|
||||
if len(data) > offset+13 && nextHeader == 6 {
|
||||
tcpflags = data[offset+13]
|
||||
|
||||
appOffset = int(data[13]>>4) * 4
|
||||
|
Reference in New Issue
Block a user