mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-14 14:56:27 +03:00
fuzz: fix the FuzzFormat comparison (#4117)
This commit is contained in:
parent
2250920e1d
commit
00e12aa918
1 changed files with 3 additions and 1 deletions
|
@ -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…
Reference in a new issue