Skip to content

Commit c912c6b

Browse files
authored
Merge pull request #200 from AdamKorcz/master
This PR adds a fuzzer that targets ParseString. No change is made to the core library.
2 parents f7e751e + 1f477a0 commit c912c6b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

fuzz.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package jsonparser
2+
3+
func FuzzParseString(data []byte) int {
4+
r, err := ParseString(data)
5+
if err != nil || r == "" {
6+
return 0
7+
}
8+
return 1
9+
}

0 commit comments

Comments
 (0)