aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2021-06-25 14:55:18 +0200
committerDominik Maier <domenukk@gmail.com>2021-06-25 14:55:23 +0200
commit89ddd9998c0e955e0277ba077c7186b77615f0e8 (patch)
treec1ca89795dd5620e20039744fe192afeaef8f65c
parent28e6b96276066a69482fdb17b38a71ba98abd700 (diff)
downloadafl++-89ddd9998c0e955e0277ba077c7186b77615f0e8.tar.gz
updated uc rust bindings
-rw-r--r--unicorn_mode/UNICORNAFL_VERSION2
-rw-r--r--unicorn_mode/samples/speedtest/rust/src/main.rs8
m---------unicorn_mode/unicornafl0
3 files changed, 5 insertions, 5 deletions
diff --git a/unicorn_mode/UNICORNAFL_VERSION b/unicorn_mode/UNICORNAFL_VERSION
index bd50965e..5db24eec 100644
--- a/unicorn_mode/UNICORNAFL_VERSION
+++ b/unicorn_mode/UNICORNAFL_VERSION
@@ -1 +1 @@
-475921a8c8674242d41b07a9dbcca9b9005b7051
+0d82727f2b477de82fa355edef9bc158bd25d374
diff --git a/unicorn_mode/samples/speedtest/rust/src/main.rs b/unicorn_mode/samples/speedtest/rust/src/main.rs
index 9ea1b873..105ba4b4 100644
--- a/unicorn_mode/samples/speedtest/rust/src/main.rs
+++ b/unicorn_mode/samples/speedtest/rust/src/main.rs
@@ -195,7 +195,7 @@ fn fuzz(input_file: &str) -> Result<(), uc_error> {
}
let place_input_callback =
- |mut uc: UnicornHandle<'_, _>, afl_input: &mut [u8], _persistent_round| {
+ |uc: &mut UnicornHandle<'_, _>, afl_input: &mut [u8], _persistent_round| {
// apply constraints to the mutated input
if afl_input.len() > INPUT_MAX as usize {
//println!("Skipping testcase with leng {}", afl_input.len());
@@ -209,7 +209,7 @@ fn fuzz(input_file: &str) -> Result<(), uc_error> {
// return true if the last run should be counted as crash
let crash_validation_callback =
- |_uc: UnicornHandle<'_, _>, result, _input: &[u8], _persistent_round| {
+ |_uc: &mut UnicornHandle<'_, _>, result, _input: &[u8], _persistent_round| {
result != uc_error::OK
};
@@ -217,9 +217,9 @@ fn fuzz(input_file: &str) -> Result<(), uc_error> {
let ret = uc.afl_fuzz(
input_file,
- Box::new(place_input_callback),
+ place_input_callback,
&end_addrs,
- Box::new(crash_validation_callback),
+ crash_validation_callback,
false,
1000,
);
diff --git a/unicorn_mode/unicornafl b/unicorn_mode/unicornafl
-Subproject 475921a8c8674242d41b07a9dbcca9b9005b705
+Subproject 0d82727f2b477de82fa355edef9bc158bd25d37