Update sniff parser to fix index out of bound error
This commit is contained in:
parent
e4c4b22c73
commit
20e99fa409
4 changed files with 41 additions and 37 deletions
2
vendor/github.com/paultag/sniff/parser/parser.go
generated
vendored
2
vendor/github.com/paultag/sniff/parser/parser.go
generated
vendored
|
|
@ -85,7 +85,7 @@ func GetSNBlock(data []byte) ([]byte, error) {
|
|||
data = data[2 : extensionLength+2]
|
||||
|
||||
for {
|
||||
if index >= len(data) {
|
||||
if index+4 >= len(data) {
|
||||
break
|
||||
}
|
||||
length := int((data[index+2] << 8) + data[index+3])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue