diff options
Diffstat (limited to 'unicorn_mode')
-rw-r--r-- | unicorn_mode/UNICORNAFL_VERSION | 2 | ||||
-rwxr-xr-x | unicorn_mode/samples/speedtest/get_offsets.py | 2 | ||||
-rw-r--r-- | unicorn_mode/samples/speedtest/rust/Makefile | 2 | ||||
-rw-r--r-- | unicorn_mode/samples/speedtest/rust/src/main.rs | 8 | ||||
m--------- | unicorn_mode/unicornafl | 0 |
5 files changed, 7 insertions, 7 deletions
diff --git a/unicorn_mode/UNICORNAFL_VERSION b/unicorn_mode/UNICORNAFL_VERSION index ffcf3b4c..5db24eec 100644 --- a/unicorn_mode/UNICORNAFL_VERSION +++ b/unicorn_mode/UNICORNAFL_VERSION @@ -1 +1 @@ -019b871539fe9ed3f41d882385a8b02c243d49ad +0d82727f2b477de82fa355edef9bc158bd25d374 diff --git a/unicorn_mode/samples/speedtest/get_offsets.py b/unicorn_mode/samples/speedtest/get_offsets.py index c9dc76df..72fb6293 100755 --- a/unicorn_mode/samples/speedtest/get_offsets.py +++ b/unicorn_mode/samples/speedtest/get_offsets.py @@ -59,7 +59,7 @@ for line in objdump_output.split("\n"): last_line = line if main_loc is None: - raise ( + raise Exception( "Could not find main in ./target! Make sure objdump is installed and the target is compiled." ) diff --git a/unicorn_mode/samples/speedtest/rust/Makefile b/unicorn_mode/samples/speedtest/rust/Makefile index 46934c93..8b91268e 100644 --- a/unicorn_mode/samples/speedtest/rust/Makefile +++ b/unicorn_mode/samples/speedtest/rust/Makefile @@ -16,7 +16,7 @@ clean: cargo build ../target: - $(MAKE) -c .. + $(MAKE) -C .. fuzz: all afl-fuzz rm -rf ./output 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 019b871539fe9ed3f41d882385a8b02c243d49a +Subproject 0d82727f2b477de82fa355edef9bc158bd25d37 |