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:
Mohammed Al Sahaf authored and GitHub committed 2020-04-02 10:40:21 -06:00
1 parent 7ca15861dd
commit 3634c4593f
1 file changed
+5
+5
View File
@@ -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,