Skip to content
Snippets Groups Projects
Commit 838f5f4e authored by Christoph Petrausch's avatar Christoph Petrausch
Browse files

first attempt for fuzzing

parent 6ee4ae92
Branches
Tags
No related merge requests found
// +build gofuzz
package packet
import "bytes"
const (
INC_PRIO = 1
KEEP = 0
DISMISS = -1
)
func Fuzz(data []byte) int {
buf := bytes.NewBuffer(data)
msg, err := Decode(buf)
if err != nil {
if msg != nil {
panic("msg != nil on error")
}
return KEEP
}
return INC_PRIO
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment