diff options
author | iximeow <me@iximeow.net> | 2025-09-29 01:35:33 +0000 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2025-09-29 01:35:33 +0000 |
commit | 5079a605a8ab1b89cb745a727dfb64b3b2e8600e (patch) | |
tree | da6e2cf63c214bd68ca45d0eba3d8772f22494a1 /fuzz/fuzz_targets | |
parent | f24c3adc9fef4b2e88b64d4aba65ba9c5d1319b6 (diff) |
add display/decode fuzzing, which caught a few issues
Diffstat (limited to 'fuzz/fuzz_targets')
-rw-r--r-- | fuzz/fuzz_targets/display_does_not_panic.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fuzz/fuzz_targets/display_does_not_panic.rs b/fuzz/fuzz_targets/display_does_not_panic.rs new file mode 100644 index 0000000..f26a268 --- /dev/null +++ b/fuzz/fuzz_targets/display_does_not_panic.rs @@ -0,0 +1,16 @@ +#![no_main] +#[macro_use] extern crate libfuzzer_sys; +extern crate yaxpeax_ia64; + +use yaxpeax_arch::{Decoder, U8Reader}; + +fuzz_target!(|data: &[u8]| { + let ia64_decoder = yaxpeax_ia64::InstDecoder::default(); + + let mut reader = U8Reader::new(data); + + if let Ok(inst) = ia64_decoder.decode(&mut reader) { + let mut out = String::new(); + let res = format!("{inst}"); + } +}); |