Highlights
Memory Corruption: 40 prior fixes. Scrutinize any change in this area.
vp9/common/vp9_postproc.c: most-fixed (7 issues). Treat as high-risk during review.
63 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.
Integer Overflow: Integer overflows in stride and allocation calculations inside `img_alloc_helper` and `vpx_img_alloc` consistently lead to small allocation sizes and subsequent heap overflows when handling malformed frame dimensions. Ensuring proper 64-bit promotion and validation against INT_MAX is critical.
Heap Buffer Overflow: The post-processing component fails to accurately track and re-allocate internal working buffers (like the `limits` buffer) when the input video resolution or scaling changes dynamically during playback, leading to out-of-bounds heap writes.
Memory Corruption: SIMD optimizations (NEON assembly and intrinsics) frequently use direct pointer casts or sequential register loads that over-read adjacent heap buffers or perform unaligned memory operations. Normalizing loads via helper functions or switching to safe memory operators is necessary.