Skip to content

Commit

Permalink
FIX : boudary check in golang package
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoit authored and Benoit committed Jan 8, 2024
1 parent 873fd49 commit bbb519e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wirego/wirego/wirego.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func wirego_dissect_packet(packetNumber C.int, src *C.char, dst *C.char, layer *
fmt.Printf("Wirego plugin did return an invalid Offset : %d (packet size is %d bytes)\n", r.Offset, packetSize)
return C.int(-1)
}
if C.int(r.Offset+r.Length) >= packetSize {
if C.int(r.Offset+r.Length) > packetSize {
fmt.Printf("Wirego plugin did return an invalid Length : %d (offset is %d and packet size is %d bytes)\n", r.Length, r.Offset, packetSize)
return C.int(-1)
}
Expand Down

0 comments on commit bbb519e

Please sign in to comment.