mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-13 22:36:27 +03:00
ci: fuzz: skip fuzz data that contains import
(#3214)
Thus far the fuzzers have found a few crashers in the Caddyfile parser. However, the fuzzer have been stuck at import glob expansion after import glob expansion, which aren't reproducible.
This commit is contained in:
parent
7ca15861dd
commit
3634c4593f
1 changed files with 5 additions and 0 deletions
|
@ -16,7 +16,12 @@
|
|||
|
||||
package caddyfile
|
||||
|
||||
import "bytes"
|
||||
|
||||
func FuzzParseCaddyfile(data []byte) (score int) {
|
||||
if bytes.Contains(data, []byte("import")) {
|
||||
return -1
|
||||
}
|
||||
sb, err := Parse("Caddyfile", data)
|
||||
if err != nil {
|
||||
// if both an error is received and some ServerBlocks,
|
||||
|
|
Loading…
Reference in a new issue