Merge pull request #3458 from AdamKorcz/fuzz1

Fuzzing: Add 3 fuzzers
This commit is contained in:
Milos Gajdos 2021-12-20 09:34:15 +00:00 committed by GitHub
commit 020bcce59d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 49 additions and 0 deletions

16
configuration/fuzz.go Normal file
View file

@ -0,0 +1,16 @@
// +build gofuzz
package configuration
import (
"bytes"
)
// ParserFuzzer implements a fuzzer that targets Parser()
// Export before building
// nolint:deadcode
func parserFuzzer(data []byte) int {
rd := bytes.NewReader(data)
_, _ = Parse(rd)
return 1
}