fix qson parsing on invalid input, close #1874 (#1880)

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-07-28 14:34:50 +03:00
committed by GitHub
parent cb4a2864da
commit c6163bb22f
2 changed files with 24 additions and 2 deletions

View File

@@ -5,6 +5,14 @@ import (
"testing"
)
func TestFuzz1(t *testing.T) {
b, err := ToJSON(`[^@hGl5=`)
if err != nil {
t.Fatal(err)
}
_ = b
}
func ExampleUnmarshal() {
type Ex struct {
A string `json:"a"`