summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammed Al Sahaf <msaa1990@gmail.com>2021-04-15 23:03:54 +0000
committerGitHub <noreply@github.com>2021-04-15 23:03:54 +0000
commit00e12aa918aedcfae3a69292efb70de615e172dd (patch)
tree8667eccf874ab99a8d31e5b9f7556a3397f1d6f1
parent2250920e1d8506991c97275f1e517e1189c20a2f (diff)
fuzz: fix the FuzzFormat comparison (#4117)
-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 8be0634..b1bbd84 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