From 481cee8f3dc6d0d9cbe7b2155c36ac53818ed66b Mon Sep 17 00:00:00 2001 From: Romain Malmain Date: Sun, 3 Nov 2024 21:04:12 +0100 Subject: [PATCH] im stupid --- .../c_code_with_fork_executor/src/main.rs | 2 +- libafl_qemu/src/modules/edges/helpers.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fuzzers/baby/backtrace_baby_fuzzers/c_code_with_fork_executor/src/main.rs b/fuzzers/baby/backtrace_baby_fuzzers/c_code_with_fork_executor/src/main.rs index 43bce6a45f..41357c3dd8 100644 --- a/fuzzers/baby/backtrace_baby_fuzzers/c_code_with_fork_executor/src/main.rs +++ b/fuzzers/baby/backtrace_baby_fuzzers/c_code_with_fork_executor/src/main.rs @@ -47,7 +47,7 @@ pub fn main() { }; // Create an observation channel using the signals map let observer = - unsafe { ConstMapObserver::::from_mut_ptr("signals", ptr::NonNull::new(map_ptr)) }; + unsafe { ConstMapObserver::::from_mut_ptr("signals", ptr::NonNull::new(map_ptr).expect("map ptr is null.") ) }; // Create a stacktrace observer let mut bt = shmem_provider.new_on_shmem::>(None).unwrap(); let bt_observer = BacktraceObserver::new( diff --git a/libafl_qemu/src/modules/edges/helpers.rs b/libafl_qemu/src/modules/edges/helpers.rs index ec11777f68..bf9f0255e9 100644 --- a/libafl_qemu/src/modules/edges/helpers.rs +++ b/libafl_qemu/src/modules/edges/helpers.rs @@ -67,7 +67,7 @@ mod generators { if IS_CONST_MAP { const { assert!( - IS_CONST_MAP && MAP_SIZE > 0, + !IS_CONST_MAP || MAP_SIZE > 0, "The size of a const map should be bigger than 0." ); MAP_SIZE.overflowing_sub(1).0