1// Copyright (C) 2020 Storj Labs, Inc. 2// See LICENSE for copying information. 3 4// +build gofuzz 5 6package extensions 7 8// To run fuzzing tests: 9// 10// clone github.com/storj/fuzz-corpus 11// 12// Install fuzzing tools: 13// GO111MODULE=off go get github.com/dvyukov/go-fuzz/... 14// 15// Build binaries: 16// go-fuzz-build . 17// 18// Run with test corpus: 19// go-fuzz -bin extensions-fuzz.zip -workdir $FUZZCORPUS/peertls/extensions 20 21// Fuzz implements a simple fuzz test for revocationDecoder. 22func Fuzz(data []byte) int { 23 var dec revocationDecoder 24 _, err := dec.decode(data) 25 if err != nil { 26 return 0 27 } 28 return 1 29} 30