Files
harfbuzz/test
Behdad Esfahbod df4be0cec8 [gpu] Use vector.reset() not resize(0) in hb_gpu_paint_clear
Three accumulator vectors -- ops, sub_blobs, transform_stack --
can enter error state via failed push_or_fail() under
failing-malloc.  Once in error state, resize(0) short-circuits
at the in_error() guard in alloc() and leaves length unchanged.

In hb_gpu_paint_clear that means the next iteration's clear
walks the stale entries again.  For sub_blobs this is a
double-destroy: the blob pointers were already freed in the
previous clear, and hb_blob_destroy reads the dead ref_count
field -- heap-use-after-free.

Fix by calling vector.reset(), which clears the error state
before resizing to 0.  Matches the pattern hb_gpu_draw_clear
already uses for draw->curves.

Found by oss-fuzz/CIFuzz on hb-gpu-fuzzer; minimized testcase
added to the fuzz corpus.

Assisted-by: Claude <noreply@anthropic.com>
2026-04-14 21:49:12 -06:00
..
2026-02-20 11:25:24 -07:00
…