miniflux-v2/vendor/github.com/andybalholm/cascadia/fuzz/fuzz.go

16 lines
282 B
Go
Raw Normal View History

2017-11-20 06:10:04 +01:00
package fuzz
import "github.com/andybalholm/cascadia"
// Fuzz is the entrypoint used by the go-fuzz framework
func Fuzz(data []byte) int {
sel, err := cascadia.Compile(string(data))
if err != nil {
if sel != nil {
panic("sel != nil on error")
}
return 0
}
return 1
}