Modifications to fuzz tests
This commit is contained in:
parent
3ae7d24d17
commit
08b803b6e7
@ -88,6 +88,18 @@ path = "fuzz_targets/fuzz_target_address_encode.rs"
|
||||
name = "fuzz_target_vec_decode"
|
||||
path = "fuzz_targets/fuzz_target_vec_decode.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "fuzz_target_vec_address_decode"
|
||||
path = "fuzz_targets/fuzz_target_vec_address_decode.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "fuzz_target_vec_u64_decode"
|
||||
path = "fuzz_targets/fuzz_target_vec_u64_decode.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "fuzz_target_vec_bool_decode"
|
||||
path = "fuzz_targets/fuzz_target_vec_bool_decode.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "fuzz_target_vec_encode"
|
||||
path = "fuzz_targets/fuzz_target_vec_encode.rs"
|
||||
|
@ -0,0 +1,12 @@
|
||||
#![no_main]
|
||||
#[macro_use] extern crate libfuzzer_sys;
|
||||
extern crate ethereum_types;
|
||||
extern crate ssz;
|
||||
|
||||
use ethereum_types::{Address};
|
||||
use ssz::{DecodeError, Decodable};
|
||||
|
||||
// Fuzz ssz_decode()
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
let _result: Result<(Vec<Address>, usize), DecodeError> = Decodable::ssz_decode(data, 0);
|
||||
});
|
@ -0,0 +1,10 @@
|
||||
#![no_main]
|
||||
#[macro_use] extern crate libfuzzer_sys;
|
||||
extern crate ssz;
|
||||
|
||||
use ssz::{DecodeError, Decodable};
|
||||
|
||||
// Fuzz ssz_decode()
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
let _result: Result<(Vec<bool>, usize), DecodeError> = Decodable::ssz_decode(data, 0);
|
||||
});
|
@ -9,13 +9,4 @@ use ssz::{DecodeError, Decodable};
|
||||
// Fuzz ssz_decode()
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
let _result: Result<(Vec<u8>, usize), DecodeError> = Decodable::ssz_decode(data, 0);
|
||||
/*
|
||||
let _result: Result<(Vec<u16>, usize), DecodeError> = Decodable::ssz_decode(data, 0);
|
||||
let _result: Result<(Vec<u32>, usize), DecodeError> = Decodable::ssz_decode(data, 0);
|
||||
let _result: Result<(Vec<u64>, usize), DecodeError> = Decodable::ssz_decode(data, 0);
|
||||
let _result: Result<(Vec<usize>, usize), DecodeError> = Decodable::ssz_decode(data, 0);
|
||||
let _result: Result<(Vec<Address>, usize), DecodeError> = Decodable::ssz_decode(data, 0);
|
||||
let _result: Result<(Vec<H256>, usize), DecodeError> = Decodable::ssz_decode(data, 0);
|
||||
let _result: Result<(Vec<bool>, usize), DecodeError> = Decodable::ssz_decode(data, 0);
|
||||
*/
|
||||
});
|
||||
|
@ -6,7 +6,7 @@ extern crate ssz;
|
||||
use ethereum_types::{Address, H256};
|
||||
use ssz::SszStream;
|
||||
|
||||
// Fuzz ssz_decode()
|
||||
// Fuzz ssz_encode()
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
|
||||
let mut ssz = SszStream::new();
|
||||
|
@ -0,0 +1,10 @@
|
||||
#![no_main]
|
||||
#[macro_use] extern crate libfuzzer_sys;
|
||||
extern crate ssz;
|
||||
|
||||
use ssz::{DecodeError, Decodable};
|
||||
|
||||
// Fuzz ssz_decode()
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
let _result: Result<(Vec<u64>, usize), DecodeError> = Decodable::ssz_decode(data, 0);
|
||||
});
|
Loading…
Reference in New Issue
Block a user