mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 14:31:10 +01:00
The raster paint clip code indexed non-rect clip alpha rows directly, assuming the clip metadata always matched a full stride*height backing buffer. Fuzzing showed that reused clip objects can reach those reads with stale scalar state, which turns the row access in push_clip_rectangle() into a heap-buffer-overflow. Reset cached clip geometry on acquire, add a validity check for non-rect alpha masks, and refuse to build new clip intersections from an invalid mask. The fallback is an empty clip, which keeps the paint path safe without affecting well-formed clips. Testing: - meson test -C build --suite fuzzing --print-errorlogs - meson test -C build Co-authored-by: OpenAI Codex <codex@openai.com>