Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 9749eb7

Browse files
committed
fix aliasing issues in SipHasher
1 parent 607076e commit 9749eb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/hash/sip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ macro_rules! load_int_le {
111111
debug_assert!($i + mem::size_of::<$int_ty>() <= $buf.len());
112112
let mut data = 0 as $int_ty;
113113
ptr::copy_nonoverlapping(
114-
$buf.get_unchecked($i),
114+
$buf.as_ptr().add($i),
115115
&mut data as *mut _ as *mut u8,
116116
mem::size_of::<$int_ty>(),
117117
);

0 commit comments

Comments
 (0)