Skip to content

Commit

Permalink
Remove unsafe operation
Browse files Browse the repository at this point in the history
  • Loading branch information
celinval authored Nov 8, 2024
1 parent 4c07dcd commit b6e185e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3540,7 +3540,7 @@ fn check_copy_untyped<T>(src: *const T, dst: *mut T, count: usize) -> bool {
let byte = kani::any_where(|sz: &usize| *sz < size_of::<T>());
let elem = kani::any_where(|val: &usize| *val < count);
let src_data = src as *const u8;
let dst_data = unsafe { dst.add(elem) } as *const u8;
let dst_data = dst.wrapping_add(elem) as *const u8;
ub_checks::can_dereference(unsafe { src_data.add(byte) })
== ub_checks::can_dereference(unsafe { dst_data.add(byte) })
} else {
Expand Down

0 comments on commit b6e185e

Please sign in to comment.