Browse Source

fuzz: fix the FuzzFormat comparison (#4117)

master
Mohammed Al Sahaf 4 years ago
committed by GitHub
parent
commit
00e12aa918
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      caddyconfig/caddyfile/formatter_fuzz.go

4
caddyconfig/caddyfile/formatter_fuzz.go

@ -16,9 +16,11 @@
package caddyfile package caddyfile
import "bytes"
func FuzzFormat(input []byte) int { func FuzzFormat(input []byte) int {
formatted := Format(input) formatted := Format(input)
if formatted != Format(formatted) { if bytes.Equal(formatted, Format(formatted)) {
return 1 return 1
} }
return 0 return 0

Loading…
Cancel
Save