vetkit.rust.memory.uninitialized
std::mem::uninitialized is used; producing an uninitialized value of almost any type is undefined behaviour.
Last updated:
Suite: Security
rust
std::mem::uninitialized is used; producing an uninitialized value of almost any type is undefined behaviour.
Category: SECURITY · Engine rule severity: WARNING
How to fix it
Use std::mem::MaybeUninit and call assume_init only after every byte has been written.
References
Source: packages/engine/rules/sast/rust.yml.
Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.