From 00e12aa918aedcfae3a69292efb70de615e172dd Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Thu, 15 Apr 2021 23:03:54 +0000 Subject: [PATCH] fuzz: fix the FuzzFormat comparison (#4117) --- caddyconfig/caddyfile/formatter_fuzz.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/caddyconfig/caddyfile/formatter_fuzz.go b/caddyconfig/caddyfile/formatter_fuzz.go index 8be06345..b1bbd84a 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