summaryrefslogtreecommitdiff
path: root/fuzz/fuzz_targets
diff options
context:
space:
mode:
Diffstat (limited to 'fuzz/fuzz_targets')
-rw-r--r--fuzz/fuzz_targets/display_does_not_panic.rs16
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}");
+ }
+});