From efce3306b322e1f93e40efd11304721b38dee887 Mon Sep 17 00:00:00 2001 From: Khyber Sen Date: Wed, 28 Aug 2024 14:03:35 -0700 Subject: [PATCH] `fn cdef::Fn::call`: Use `.wrapping_as_ptr` for `bottom` to avoid out-of-bounds, as the ptr is temporarily out of bounds when passed to asm. --- src/cdef.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cdef.rs b/src/cdef.rs index a768431af..464e94386 100644 --- a/src/cdef.rs +++ b/src/cdef.rs @@ -86,7 +86,7 @@ impl cdef::Fn { let stride = dst.stride(); let left = ptr::from_ref(left).cast(); let top_ptr = top.as_ptr::().cast(); - let bottom_ptr = bottom.as_ptr::().cast(); + let bottom_ptr = bottom.wrapping_as_ptr::().cast(); let top = FFISafe::new(&top); let bottom = FFISafe::new(&bottom); let sec_strength = sec_strength as c_int;