mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-04 10:11:10 +01:00 
			
		
		
		
	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 62451fd3eb68cef5dcdafe6e4228f08cf52d84fc.
		
			
				
	
	
		
			22 lines
		
	
	
		
			368 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			22 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)
 | 
						|
}
 |