1
0
Fork 1
mirror of https://github.com/vbatts/tar-split.git synced 2025-02-22 02:29:01 +00:00
tar-split/tar/storage/fuzz.go

24 lines
280 B
Go
Raw Normal View History

// +build gofuzz
package storage
import (
"bytes"
"log"
)
func Fuzz(data []byte) int {
unpacker := NewJSONUnpacker(bytes.NewReader(data))
for {
entry, err := unpacker.Next()
if err != nil {
log.Println(err)
return 0
}
log.Printf("%v", entry)
}
return 1
}