tile38/vendor/github.com/streadway/amqp/fuzz.go

18 lines
238 B
Go
Raw Normal View History

2017-03-15 20:45:35 +03:00
// +build gofuzz
package amqp
import "bytes"
func Fuzz(data []byte) int {
r := reader{bytes.NewReader(data)}
frame, err := r.ReadFrame()
if err != nil {
if frame != nil {
panic("frame is not nil")
}
return 0
}
return 1
}