Files
Behdad Esfahbod c89f1c20b0 [raster] Harden color-stop fetches under failing malloc (#5858)
Malformed COLRv1 gradients can report a non-zero stop count and then
leave the effective stop array empty once allocations fail. The raster
path assumed the second fetch always produced at least one stop and
indexed stops[0], which let fuzzing hit a stack-buffer-underflow in
evaluate_color_line().

Reject empty effective stop lists after the second fetch, handle
zero-stop and one-stop evaluation defensively, and clamp non-finite
gradient parameters before lookup. Apply the same stop-fetch
hardening to the Cairo and vector paint helpers, including fixing
Cairos wrong NULL check after hb_malloc().

Testing: not run (per user request)

Fixes: https://oss-fuzz.com/testcase-detail/4635834988167168
Assisted-by: OpenAI Codex
2026-03-18 16:06:29 -06:00
..
2020-01-31 16:37:30 -05:00
2022-06-01 07:39:20 -06:00