Hi, I am scanning this crate in the latest version using my own static analyzer tool.
Unsafe pointer conversion is found at:
unsafe fn output_from_raw(
pointer: NonNull<c_void>,
_sample_count: u32,
) -> Self::OutputPortType {
Cell::from_mut(&mut *(pointer.as_ptr() as *mut f32))
}
This unsound implementation would create memory issues such as overflow, underflow, or misalignment. The attacker can manipulate the argument pointer associated with the c_void pointer with an unexpected type, size, or alignment, which can lead to an out-of-bounds memory access bug. The c_void pointer is directly cast to *mut f32 and dereferenced, which can further corrupt the C/C++ code.
This would cause undefined behaviors in Rust. Adversaries can manipulate the associated pointer argument to cause memory safety bugs. I am reporting this issue for your attention.
Hi, I am scanning this crate in the latest version using my own static analyzer tool.
Unsafe pointer conversion is found at:
This unsound implementation would create memory issues such as overflow, underflow, or misalignment. The attacker can manipulate the argument
pointerassociated with thec_voidpointer with an unexpected type, size, or alignment, which can lead to an out-of-bounds memory access bug. Thec_voidpointer is directly cast to*mut f32and dereferenced, which can further corrupt the C/C++ code.This would cause undefined behaviors in Rust. Adversaries can manipulate the associated pointer argument to cause memory safety bugs. I am reporting this issue for your attention.