diff options
author | Mohammed Al Sahaf <msaa1990@gmail.com> | 2020-04-02 19:40:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-02 10:40:21 -0600 |
commit | 3634c4593f2d9999dca2d7a02e23edc29bf7bd11 (patch) | |
tree | 63563aa94e4333fa1b52337eecbabece333c1b48 | |
parent | 7ca15861dd70e72f242b2c0077b5678bae83ffad (diff) |
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.
-rw-r--r-- | caddyconfig/caddyfile/parse_fuzz.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/caddyconfig/caddyfile/parse_fuzz.go b/caddyconfig/caddyfile/parse_fuzz.go index 3214e1d..8e8ea73 100644 --- a/caddyconfig/caddyfile/parse_fuzz.go +++ b/caddyconfig/caddyfile/parse_fuzz.go @@ -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, |