From 00e12aa918aedcfae3a69292efb70de615e172dd Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Thu, 15 Apr 2021 23:03:54 +0000 Subject: fuzz: fix the FuzzFormat comparison (#4117) --- caddyconfig/caddyfile/formatter_fuzz.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'caddyconfig') 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 -- cgit v1.2.3