aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fuzz_corefile.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/fuzz_corefile.go b/test/fuzz_corefile.go
new file mode 100644
index 000000000..0abb9d6b3
--- /dev/null
+++ b/test/fuzz_corefile.go
@@ -0,0 +1,12 @@
+// +build fuzz
+
+package test
+
+// Fuzz fuzzes a corefile.
+func Fuzz(data []byte) int {
+ _, _, _, err := CoreDNSServerAndPorts(string(data))
+ if err != nil {
+ return 1
+ }
+ return 0
+}