diff options
author | zseri <zseri.devel@ytrizja.de> | 2021-12-25T05·12+0100 |
---|---|---|
committer | zseri <zseri.devel@ytrizja.de> | 2021-12-25T05·14+0000 |
commit | d6b0aca7dd78a99f3167646b67849dce632aea46 (patch) | |
tree | ec313d94baf8cd0b6fec6b67d53ccfbd1601c012 | |
parent | 1cc8aa56a44a83fd6d1841089fea8991d792207e (diff) |
chore(zseri/store-ref-scanner): use tailored fuzz input r/3387
Change-Id: Ib061154c2329432469e8f7bef4598402a56bd0c3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4606 Reviewed-by: zseri <zseri.devel@ytrizja.de> Tested-by: BuildkiteCI
-rw-r--r-- | users/zseri/store-ref-scanner/fuzz/fuzz_targets/hbm-roundtrip.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/users/zseri/store-ref-scanner/fuzz/fuzz_targets/hbm-roundtrip.rs b/users/zseri/store-ref-scanner/fuzz/fuzz_targets/hbm-roundtrip.rs index 0738da68b77d..9e21a7738a38 100644 --- a/users/zseri/store-ref-scanner/fuzz/fuzz_targets/hbm-roundtrip.rs +++ b/users/zseri/store-ref-scanner/fuzz/fuzz_targets/hbm-roundtrip.rs @@ -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 b = a.into_expanded(); - let c = HalfBytesMask::from_expanded(b); - assert_eq!(a, c); - } + let a = HalfBytesMask(data); + let b = a.into_expanded(); + let c = HalfBytesMask::from_expanded(b); + assert_eq!(a, c); }); |