summaryrefslogtreecommitdiffhomepage
path: root/caddyconfig
diff options
context:
space:
mode:
authorMohammed Al Sahaf <[email protected]>2021-04-15 23:03:54 +0000
committerGitHub <[email protected]>2021-04-15 23:03:54 +0000
commit00e12aa918aedcfae3a69292efb70de615e172dd (patch)
tree8667eccf874ab99a8d31e5b9f7556a3397f1d6f1 /caddyconfig
parent2250920e1d8506991c97275f1e517e1189c20a2f (diff)
downloadcaddy-00e12aa918aedcfae3a69292efb70de615e172dd.tar.gz
caddy-00e12aa918aedcfae3a69292efb70de615e172dd.zip
fuzz: fix the FuzzFormat comparison (#4117)
Diffstat (limited to 'caddyconfig')
-rw-r--r--caddyconfig/caddyfile/formatter_fuzz.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/caddyconfig/caddyfile/formatter_fuzz.go b/caddyconfig/caddyfile/formatter_fuzz.go
index 8be063459..b1bbd84a6 100644
--- a/caddyconfig/caddyfile/formatter_fuzz.go
+++ b/caddyconfig/caddyfile/formatter_fuzz.go
@@ -16,9 +16,11 @@
package caddyfile
+import "bytes"
+
func FuzzFormat(input []byte) int {
formatted := Format(input)
- if formatted != Format(formatted) {
+ if bytes.Equal(formatted, Format(formatted)) {
return 1
}
return 0