Skip to content

Commit

Permalink
Fix NF9 buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
taktv6 committed Jan 22, 2020
1 parent 4cdf82b commit b24a635
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nf9/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ func Decode(raw []byte, remote net.IP) (*Packet, error) {
data := convert.Reverse(raw) //TODO: Make it endian aware. This assumes a little endian machine

pSize := len(data)
bufSize := 1500
buffer := [1500]byte{}
bufSize := 9216
buffer := [9216]byte{}

if pSize > bufSize {
panic("Buffer too small\n")
panic(fmt.Sprintf("Buffer too small (%d/%d)", pSize, bufSize))
}

// copy data into array as arrays allow us to cast the shit out of it
Expand Down

0 comments on commit b24a635

Please sign in to comment.