Newer
Older
// +build go fuzz
const (
INC_PRIO = 1
KEEP = 0
DISMISS = -1
)
func Fuzz(data []byte) int {
buf := bytes.NewBuffer(data)
for _, option := range getAllDecodingOptions() {
msg, err := Decode(buf, &option)
if err != nil {
if msg != nil {
panic("msg != nil on error")
}
func getAllDecodingOptions() []DecodeOptions {
var ret []DecodeOptions
ret = append(ret, DecodeOptions{
})