MCPcopy
hub / github.com/pquerna/ffjson / FuzzUnmarshal

Function FuzzUnmarshal

tests/fuzz/target_fuzz.go:10–21  ·  view source on GitHub ↗

FuzzUnmarshal tests unmarshaling.

(fuzz []byte)

Source from the content-addressed store, hash-verified

8
9// FuzzUnmarshal tests unmarshaling.
10func FuzzUnmarshal(fuzz []byte) int {
11 data := &Data{}
12 err := data.UnmarshalJSON(fuzz)
13 if err != nil {
14 return 0
15 }
16 _, err = data.MarshalJSON()
17 if err != nil {
18 return 0
19 }
20 return 1
21}

Callers

nothing calls this directly

Calls 2

UnmarshalJSONMethod · 0.45
MarshalJSONMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…