From b24a6352abc63122d61fc0b6286a71625465942f Mon Sep 17 00:00:00 2001 From: Oliver Herms Date: Wed, 22 Jan 2020 10:07:39 +0100 Subject: [PATCH] Fix NF9 buffer --- nf9/decode.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nf9/decode.go b/nf9/decode.go index be5a2d4..7b64241 100644 --- a/nf9/decode.go +++ b/nf9/decode.go @@ -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