diff options
| author | iximeow <me@iximeow.net> | 2026-07-05 03:50:34 +0000 |
|---|---|---|
| committer | iximeow <me@iximeow.net> | 2026-07-05 03:50:34 +0000 |
| commit | f08fb038def88e7025d19aeaa1cb45125074f6c2 (patch) | |
| tree | 841b46a41143f41721dd6126512dc2e81de28a4c /fuzz/fuzz_targets/display_masm_does_not_panic.rs | |
| parent | 43a6554770d6bfd74c05d37af772e0a65ef54ab1 (diff) | |
2.2.02.2.0
Diffstat (limited to 'fuzz/fuzz_targets/display_masm_does_not_panic.rs')
| -rw-r--r-- | fuzz/fuzz_targets/display_masm_does_not_panic.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fuzz/fuzz_targets/display_masm_does_not_panic.rs b/fuzz/fuzz_targets/display_masm_does_not_panic.rs new file mode 100644 index 0000000..ac9bd02 --- /dev/null +++ b/fuzz/fuzz_targets/display_masm_does_not_panic.rs @@ -0,0 +1,21 @@ +#![no_main] +#[macro_use] extern crate libfuzzer_sys; +extern crate yaxpeax_x86; + +fuzz_target!(|data: &[u8]| { + let x86_64_decoder = yaxpeax_x86::long_mode::InstDecoder::default(); + let x86_32_decoder = yaxpeax_x86::protected_mode::InstDecoder::default(); + let x86_16_decoder = yaxpeax_x86::real_mode::InstDecoder::default(); + + if let Ok(inst) = x86_64_decoder.decode_slice(data) { + let _ = inst.display_with(yaxpeax_x86::long_mode::DisplayStyle::Masm).to_string(); + }; + + if let Ok(inst) = x86_32_decoder.decode_slice(data) { + let _ = inst.display_with(yaxpeax_x86::protected_mode::DisplayStyle::Masm).to_string(); + }; + + if let Ok(inst) = x86_16_decoder.decode_slice(data) { + let _ = inst.display_with(yaxpeax_x86::real_mode::DisplayStyle::Masm).to_string(); + }; +}); |
