smallvec creates uninitialized value of any type
Moderate severity
GitHub Reviewed
Published
Aug 25, 2021
to the GitHub Advisory Database
•
Updated Jan 11, 2023
Description
Reviewed
Aug 6, 2021
Published to the GitHub Advisory Database
Aug 25, 2021
Last updated
Jan 11, 2023
Affected versions of this crate called
mem::uninitialized()
to create values of a user-supplied typeT
.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()
, usingMaybeUninit
instead.References