Skip to content

Commit d0c6d06

Browse files
committed
wrapping_add
1 parent 6877be0 commit d0c6d06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libafl_targets/src/sancov_pcguard.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ pub unsafe extern "C" fn __sanitizer_cov_trace_pc_guard(guard: *mut u32) {
2323
}
2424
#[cfg(feature = "sancov_pcguard_hitcounts")]
2525
{
26-
let val = (EDGES_MAP_PTR as *mut u8).add(pos).read();
27-
(EDGES_MAP_PTR as *mut u8).add(pos).write(val + 1);
26+
let val = (EDGES_MAP_PTR as *mut u8).add(pos).read().wrapping_add(1);
27+
(EDGES_MAP_PTR as *mut u8).add(pos).write(val);
2828
}
2929
}
3030

0 commit comments

Comments
 (0)