Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pam/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ pub unsafe extern "C" fn pam_sm_open_session(
return PAM_SUCCESS;
}

let password = unsafe { &*(password_ptr as *const Zeroizing<Vec<u8>>) };
let password = unsafe { Box::from_raw(password_ptr.cast::<Zeroizing<Vec<u8>>>().cast_mut()) };
tracing::debug!(
"Retrieved stashed password of length {} bytes",
password.len()
Expand Down
Loading