2018-02-17 05:18:25 +00:00
|
|
|
package fuzzconfig
|
|
|
|
|
|
|
|
import (
|
2019-09-09 23:08:19 +00:00
|
|
|
"github.com/hashicorp/hcl/v2/json"
|
2018-02-17 05:18:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func Fuzz(data []byte) int {
|
|
|
|
_, diags := json.Parse(data, "<fuzz-conf>")
|
|
|
|
|
|
|
|
if diags.HasErrors() {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1
|
|
|
|
}
|