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/instruction_text_buffer_size_ok.rs | |
| parent | 43a6554770d6bfd74c05d37af772e0a65ef54ab1 (diff) | |
2.2.02.2.0
Diffstat (limited to 'fuzz/fuzz_targets/instruction_text_buffer_size_ok.rs')
| -rw-r--r-- | fuzz/fuzz_targets/instruction_text_buffer_size_ok.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fuzz/fuzz_targets/instruction_text_buffer_size_ok.rs b/fuzz/fuzz_targets/instruction_text_buffer_size_ok.rs index 2c88424..16bd098 100644 --- a/fuzz/fuzz_targets/instruction_text_buffer_size_ok.rs +++ b/fuzz/fuzz_targets/instruction_text_buffer_size_ok.rs @@ -21,6 +21,10 @@ fuzz_target!(|data: &[u8]| { write!(s, "{}", inst.display_with(DisplayStyle::C)).expect("can write"); // MAX_INSTRUCTION_LEN is not a public crate item yet... assert!(s.len() < 512); + s.clear(); + write!(s, "{}", inst.display_with(DisplayStyle::Masm)).expect("can write"); + // MAX_INSTRUCTION_LEN is not a public crate item yet... + assert!(s.len() < 512); }; if let Ok(inst) = x86_32_decoder.decode_slice(data) { @@ -34,6 +38,10 @@ fuzz_target!(|data: &[u8]| { write!(s, "{}", inst.display_with(DisplayStyle::C)).expect("can write"); // MAX_INSTRUCTION_LEN is not a public crate item yet... assert!(s.len() < 512); + s.clear(); + write!(s, "{}", inst.display_with(DisplayStyle::Masm)).expect("can write"); + // MAX_INSTRUCTION_LEN is not a public crate item yet... + assert!(s.len() < 512); }; if let Ok(inst) = x86_16_decoder.decode_slice(data) { @@ -47,5 +55,9 @@ fuzz_target!(|data: &[u8]| { write!(s, "{}", inst.display_with(DisplayStyle::C)).expect("can write"); // MAX_INSTRUCTION_LEN is not a public crate item yet... assert!(s.len() < 512); + s.clear(); + write!(s, "{}", inst.display_with(DisplayStyle::Masm)).expect("can write"); + // MAX_INSTRUCTION_LEN is not a public crate item yet... + assert!(s.len() < 512); }; }); |
