This can't be used in its current form; revert the entire PR.
Revert "fuzzing: allow setup function to be called (#3175)"
This reverts commit 62451fd3eb
.
21 lines
368 B
Go
21 lines
368 B
Go
// +build gofuzz
|
|
|
|
package rewrite
|
|
|
|
import (
|
|
"github.com/coredns/coredns/plugin/pkg/fuzz"
|
|
|
|
"github.com/caddyserver/caddy"
|
|
)
|
|
|
|
// Fuzz fuzzes rewrite.
|
|
func Fuzz(data []byte) int {
|
|
c := caddy.NewTestController("dns", "rewrite edns0 subnet set 24 56")
|
|
rules, err := rewriteParse(c)
|
|
if err != nil {
|
|
return 0
|
|
}
|
|
r := Rewrite{Rules: rules}
|
|
|
|
return fuzz.Do(r, data)
|
|
}
|