Skip to content

Commit

Permalink
Fix fuzz (#199)
Browse files Browse the repository at this point in the history
Fix fuzzer (LoadString does not exist), and mention it in the README.
  • Loading branch information
pelletier authored Oct 22, 2017
1 parent 6d85886 commit 8c31c2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 8c31c2e

Please sign in to comment.