Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

lokathor/tinyvec
main @ 2fa5bad
2
Fixes
0
CVEs
HIGH
Peak severity
50.0%
Coverage
Highlights
Memory Corruption: 1 prior fix. Scrutinize any change in this area.
src/arrayvec.rs: most-fixed (2 issues). Treat as high-risk during review.
1 high-severity fix in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Memory Safety: Integer overflow during iterator traversal (`ArrayVecIterator::nth_back`) with large index offsets can bypass bounds checks, leading to out-of-bounds memory access. Implementing safe arithmetic bounds checks prevents such boundary-crossing vulnerabilities.
Memory Corruption: Unsafe code relying on the user-implemented `Array::CAPACITY` constant can lead to out-of-bounds memory access if the implementation returns a value inconsistent with the actual backing slice capacity. Deriving capacity dynamically from the slice length mitigates this risk.