GitHub Advisoryadvisory · crates.io
GHSA-66p5-j55p-32r9 smallvec creates uninitialized value of any type
MEDIUM
Official page ↗
- Ecosystem
- crates.io
- Packages
- smallvec
- Severity
- Moderate
- Weaknesses
- CWE-457
- Reviewed
- 2021-08-06
Affected packages
• crates.io smallvec: < 0.6.13 → fixed in 0.6.13
Description
Affected versions of this crate called `mem::uninitialized()` to create values of a user-supplied type `T`.
This is unsound e.g. if `T` is a reference type (which must be non-null and thus may not remain uninitialized).
The flaw was corrected by avoiding the use of `mem::uninitialized()`, using `MaybeUninit` instead.
Related
Weakness · CWE (1)
- CWE-457 Use of Uninitialized Variable weakness