summaryrefslogtreecommitdiffstats
path: root/src/dma/vendor/github.com/streadway/amqp/fuzz.go
blob: 16e626ce751d0f111bde1d08fbbbb301b2631b08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// +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
}