Highlights
Denial of Service: 4 prior fixes. Scrutinize any change in this area.
src/decoder/image.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.
Denial of Service: Unchecked memory allocation using raw IFD (Image File Directory) value sizes can lead to Out-Of-Memory (OOM) panics. Restricting allocation capacities using strict limits like `ifd_value_size` is critical to preventing resource exhaustion from untrusted inputs.
Denial of Service: Unchecked bitwise left-shift operations and multiplication on arbitrary `BitsPerSample` properties cause shift overflow panics during ColorMap decoding. Safe decoding requires explicit checked shifts and checked multiplication.
Denial of Service: On 32-bit architectures, unchecked conversion and stride calculations involving large `RowsPerStrip` values can lead to panics. Clamping chunk heights to logical image dimensions before stride computations is necessary to mitigate this platform-specific risk.