-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Rust 1.92.0
- no_mangle requires unsafe
- And
let output = unsafe { core::slice::from_raw_parts_mut(0 as *mut u8, new_len) };error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
--> src/lib.rs:10:27
|
10 | let output = unsafe { core::slice::from_raw_parts_mut(0 as *mut u8, new_sz) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-^^^^^^^^^^^^^^^^^^^^
| |
| null pointer originates from here
|
= help: for more information, visit <https://doc.rust-lang.org/std/ptr/index.html> and <https://doc.rust-lang.org/reference/behavior-considered-undefined.html>
= note: `#[deny(invalid_null_arguments)]` on by defaultMetadata
Metadata
Assignees
Labels
No labels