Security context

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

burntsushi/rust-snappy
master @ 498b175
3
Fixes
0
CVEs
HIGH
Peak severity
0.0%
Coverage
Highlights
Buffer Overflow: 1 prior fix. Scrutinize any change in this area.
src/decompress.rs: most-fixed (2 issues). Treat as high-risk during review.
3 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

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

Memory Corruption: Incorrect threshold calculations during overlapping pointer copies via core::ptr::copy can cause out-of-bounds memory writes. Developers should verify that remaining-space calculations rigorously account for overlapping copy regions.
Buffer Overflow: Integer overflows on 32-bit platforms when validating literal lengths can bypass safety boundaries, leading to out-of-bounds copies via ptr::copy_nonoverlapping. Explicit checks must be applied to prevent integer wrapping before memory copy operations.
Integer Underflow: Parsing invalid frame chunk lengths of less than 4 bytes can cause subtraction underflows when calculating framing overhead, leading to massive size arguments. Length validations must occur before any subtraction.