Skip to content
Merged
Show file tree
Hide file tree
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: 2 additions & 0 deletions zeroize/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## 1.9.1 (UNRELEASED)
### Fixed
- False positive failures in proxy allocator test ([#1538])
- Potential uninitialized memory read in fallback code used by `optimization_barrier` ([#1551])

[#1538]: https://github.com/RustCrypto/utils/pull/1538
[#1551]: https://github.com/RustCrypto/utils/pull/1551

## 1.9.0 (2026-06-12)
### Added
Expand Down
4 changes: 3 additions & 1 deletion zeroize/src/barrier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ pub fn optimization_barrier<T: ?Sized>(val: &T) {
/// `#[inline(never)]` and `read_volatile`.
#[inline(never)]
fn custom_black_box(p: *const u8) {
let _ = unsafe { core::ptr::read_volatile(p) };
use core::mem::MaybeUninit;

let _: MaybeUninit<u8> = unsafe { core::ptr::read_volatile(p.cast()) };
}

core::hint::black_box(val);
Expand Down
Loading