We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/pozm/bsod-rs/blob/9a80e6c801e9b7ada458c0acd0240010d89fa5bc/src/lib.rs#L27
this code is UB, as pointed by CStr::as_ptr documentation (https://doc.rust-lang.org/std/ffi/struct.CString.html#method.as_ptr):
CStr::as_ptr
// Do not do this: let ptr = CString::new("Hello").expect("CString::new failed").as_ptr(); unsafe { // `ptr` is dangling *ptr; }
The text was updated successfully, but these errors were encountered:
it is, but what follows immediately after means that it doesn't matter much
Sorry, something went wrong.
assuming it executes properly, given e.g. loading the library could fail with dangling pointer
No branches or pull requests
https://github.com/pozm/bsod-rs/blob/9a80e6c801e9b7ada458c0acd0240010d89fa5bc/src/lib.rs#L27
this code is UB, as pointed by
CStr::as_ptr
documentation (https://doc.rust-lang.org/std/ffi/struct.CString.html#method.as_ptr):The text was updated successfully, but these errors were encountered: