aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack O'Connor <[email protected]>2025-09-29 17:05:08 -0700
committerJack O'Connor <[email protected]>2025-09-29 17:05:08 -0700
commit2308ddc03f72ba78ded1fa32b01e257faee2b5df (patch)
tree6097995b7cf2e8ec7e284e1ef3fa9014cf7e035c
parentb8c5ef089381b7db8665ea519a1e6901d79daf1a (diff)
one more unsafe block, in ffi_neon.rs
-rw-r--r--src/ffi_neon.rs26
1 files 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<const N: usize>(
// 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