mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
oss-fuzz: fix remaining errors
This commit is contained in:
parent
69d3d5cd42
commit
51908e210d
4 changed files with 9 additions and 6 deletions
|
|
@ -1,13 +1,10 @@
|
|||
//go:build gofuzz
|
||||
// +build gofuzz
|
||||
|
||||
package blake2b
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
)
|
||||
|
||||
func Fuzz(data []byte) int {
|
||||
func fuzz(data []byte) int {
|
||||
// Make sure the data confirms to the input model
|
||||
if len(data) != 211 {
|
||||
return 0
|
||||
|
|
|
|||
|
|
@ -6,6 +6,12 @@ import (
|
|||
"testing"
|
||||
)
|
||||
|
||||
func Fuzz(f *testing.F) {
|
||||
f.Fuzz(func(t *testing.T, data []byte) {
|
||||
fuzz(data)
|
||||
})
|
||||
}
|
||||
|
||||
func TestF(t *testing.T) {
|
||||
for i, test := range testVectorsF {
|
||||
t.Run(fmt.Sprintf("test vector %v", i), func(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ compile_fuzzer tests/fuzzers/bn256 FuzzMul fuzzBn256Mul
|
|||
compile_fuzzer tests/fuzzers/bn256 FuzzPair fuzzBn256Pair
|
||||
compile_fuzzer tests/fuzzers/runtime Fuzz fuzzVmRuntime
|
||||
compile_fuzzer tests/fuzzers/keystore Fuzz fuzzKeystore
|
||||
compile_fuzzer tests/fuzzers/txfetcher FuzzFetcher fuzzTxfetcher
|
||||
compile_fuzzer tests/fuzzers/txfetcher Fuzz fuzzTxfetcher
|
||||
compile_fuzzer tests/fuzzers/rlp Fuzz fuzzRlp
|
||||
compile_fuzzer tests/fuzzers/trie Fuzz fuzzTrie
|
||||
compile_fuzzer tests/fuzzers/stacktrie Fuzz fuzzStackTrie
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package trie
|
||||
package txfetcher
|
||||
|
||||
import "testing"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue