fuzz: fix the FuzzFormat comparison (#4117)

This commit is contained in:
Mohammed Al Sahaf 2021-04-15 23:03:54 +00:00 committed by GitHub
parent 2250920e1d
commit 00e12aa918
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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