From 8c31c2ec65b208cc2ad1608bf25a3ff91adf1944 Mon Sep 17 00:00:00 2001 From: Thomas Pelletier Date: Sat, 21 Oct 2017 19:23:38 -0700 Subject: [PATCH] Fix fuzz (#199) Fix fuzzer (LoadString does not exist), and mention it in the README. --- README.md | 5 +++++ fuzz.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 10c31bd..0d357ac 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,11 @@ You have to make sure two kind of tests run: You can run both of them using `./test.sh`. +### Fuzzing + +The script `./fuzz.sh` is available to +run [go-fuzz](https://github.com/dvyukov/go-fuzz) on go-toml. + ## Versioning Go-toml follows [Semantic Versioning](http://semver.org/). The supported version diff --git a/fuzz.go b/fuzz.go index 38f8b0a..14570c8 100644 --- a/fuzz.go +++ b/fuzz.go @@ -19,7 +19,7 @@ func Fuzz(data []byte) int { panic(err) } - tree, err = LoadString(str) + tree, err = Load(str) if err != nil { if tree != nil { panic("tree must be nil if there is an error")