1
0
Fork 1
mirror of https://github.com/vbatts/tar-split.git synced 2025-02-21 10:09:01 +00:00
tar-split/tar/storage/fuzz.go
Vincent Batts 4de2011f4a
tar/storage: test out go-fuzz
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-04-11 09:09:49 -04:00

23 lines
280 B
Go

// +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
}