chore(zseri/store-ref-scanner): use tailored fuzz input
Change-Id: Ib061154c2329432469e8f7bef4598402a56bd0c3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4606 Reviewed-by: zseri <zseri.devel@ytrizja.de> Tested-by: BuildkiteCI
This commit is contained in:
parent
1cc8aa56a4
commit
d6b0aca7dd
1 changed files with 5 additions and 8 deletions
|
@ -1,13 +1,10 @@
|
|||
#![no_main]
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
use core::convert::TryInto;
|
||||
fuzz_target!(|data: [u8; 16]| {
|
||||
use store_ref_scanner::HalfBytesMask;
|
||||
for i in data.chunks_exact(16) {
|
||||
let a = HalfBytesMask(i.try_into().unwrap());
|
||||
let a = HalfBytesMask(data);
|
||||
let b = a.into_expanded();
|
||||
let c = HalfBytesMask::from_expanded(b);
|
||||
assert_eq!(a, c);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue