Files
buildx/vendor/github.com/valyala/fastjson/fuzz.go
T
Sebastiaan van Stijn 3f0b52dc73 vendor: github.com/valyala/fastjson v1.6.7
- pool.go: add missing Arena.Reset() call inside ArenaPool.Put()
- Treat nil values as null in SetArrayItem
  prevents a potential panic when a nil value is used as an array item

full diff: https://github.com/valyala/fastjson/compare/v1.6.4...v1.6.7

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-07-01 15:31:33 +02:00

24 lines
292 B
Go

//go:build gofuzz
// +build gofuzz
package fastjson
func Fuzz(data []byte) int {
err := ValidateBytes(data)
if err != nil {
return 0
}
v := MustParseBytes(data)
dst := make([]byte, 0)
dst = v.MarshalTo(dst)
err = ValidateBytes(dst)
if err != nil {
panic(err)
}
return 1
}