1
0
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:
Louis
2022-01-06 22:00:10 +01:00
committed by GitHub

View File

@ -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