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