Skip to content

Commit 7d34d88

Browse files
committed
Fix broken reallocarray implementation
1 parent c0c7014 commit 7d34d88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

preload/src/api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ pub unsafe extern "C" fn realloc( old_ptr: *mut c_void, size: size_t ) -> *mut c
326326
}
327327

328328
#[cfg_attr(not(test), no_mangle)]
329-
pub unsafe extern "C" fn reallocarray( old_ptr: &mut c_void, count: size_t, element_size: size_t ) -> *mut c_void {
329+
pub unsafe extern "C" fn reallocarray( old_ptr: *mut c_void, count: size_t, element_size: size_t ) -> *mut c_void {
330330
let size = match (count as usize).checked_mul( element_size as usize ) {
331331
None => {
332332
*libc::__errno_location() = libc::ENOMEM;

0 commit comments

Comments
 (0)