about summary refs log tree commit diff
path: root/unicorn_mode/samples/speedtest
diff options
context:
space:
mode:
Diffstat (limited to 'unicorn_mode/samples/speedtest')
-rw-r--r--unicorn_mode/samples/speedtest/rust/Cargo.toml4
-rw-r--r--unicorn_mode/samples/speedtest/rust/src/main.rs6
2 files changed, 6 insertions, 4 deletions
diff --git a/unicorn_mode/samples/speedtest/rust/Cargo.toml b/unicorn_mode/samples/speedtest/rust/Cargo.toml
index c19ee0a1..9b81be0b 100644
--- a/unicorn_mode/samples/speedtest/rust/Cargo.toml
+++ b/unicorn_mode/samples/speedtest/rust/Cargo.toml
@@ -11,5 +11,5 @@ panic = "abort"
 
 [dependencies]
 unicornafl = { path = "../../../unicornafl/bindings/rust/", version="1.0.0" }
-capstone="0.6.0"
-libc="0.2.66"
\ No newline at end of file
+capstone="0.10.0"
+libc="0.2.66"
diff --git a/unicorn_mode/samples/speedtest/rust/src/main.rs b/unicorn_mode/samples/speedtest/rust/src/main.rs
index 89e10833..cded1a3c 100644
--- a/unicorn_mode/samples/speedtest/rust/src/main.rs
+++ b/unicorn_mode/samples/speedtest/rust/src/main.rs
@@ -11,6 +11,7 @@ use std::{
 };
 
 use unicornafl::{
+    afl::afl_fuzz,
     unicorn_const::{uc_error, Arch, Mode, Permission},
     RegisterX86::*,
     Unicorn,
@@ -87,7 +88,7 @@ fn main() {
 }
 
 fn fuzz(input_file: &str) -> Result<(), uc_error> {
-    let mut uc = Unicorn::new(Arch::X86, Mode::MODE_64, 0)?;
+    let mut uc = Unicorn::new(Arch::X86, Mode::MODE_64)?;
 
     let binary =
         read_file(BINARY).unwrap_or_else(|_| panic!("Could not read modem image: {}", BINARY));
@@ -212,7 +213,8 @@ fn fuzz(input_file: &str) -> Result<(), uc_error> {
 
     let end_addrs = parse_locs("main_ends").unwrap();
 
-    let ret = uc.afl_fuzz(
+    let ret = afl_fuzz(
+        &mut uc,
         input_file,
         place_input_callback,
         &end_addrs,