From 2308ddc03f72ba78ded1fa32b01e257faee2b5df Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Mon, 29 Sep 2025 17:05:08 -0700 Subject: one more unsafe block, in ffi_neon.rs --- src/ffi_neon.rs | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/ffi_neon.rs b/src/ffi_neon.rs index 54d07a4..0b443c9 100644 --- a/src/ffi_neon.rs +++ b/src/ffi_neon.rs @@ -15,18 +15,20 @@ pub unsafe fn hash_many( // array, but the C implementations don't. Even though this is an unsafe // function, assert the bounds here. assert!(out.len() >= inputs.len() * OUT_LEN); - ffi::blake3_hash_many_neon( - inputs.as_ptr() as *const *const u8, - inputs.len(), - N / BLOCK_LEN, - key.as_ptr(), - counter, - increment_counter.yes(), - flags, - flags_start, - flags_end, - out.as_mut_ptr(), - ) + unsafe { + ffi::blake3_hash_many_neon( + inputs.as_ptr() as *const *const u8, + inputs.len(), + N / BLOCK_LEN, + key.as_ptr(), + counter, + increment_counter.yes(), + flags, + flags_start, + flags_end, + out.as_mut_ptr(), + ) + } } // blake3_neon.c normally depends on blake3_portable.c, because the NEON -- cgit v1.2.3