Files
harfbuzz/util/gpu/web
Garret Rieger d60f62df48 [util/gpu] Avoid use-after-free on current_text in rebuild_buffer (#6253)
In hb-gpu-web and hb-gpu-web-webgpu, rebuild_buffer() frees current_text
after duplicating the input text, but then passes the original text
pointer to demo_buffer_add_text(). When called from web_load_font(),
web_set_variations(), web_set_features(), or web_set_palette() with
custom text active, text aliases current_text, resulting in a
use-after-free read of recently freed heap memory.

Fix this by:
1. Skipping redundant reallocation when text already equals
   current_text.
2. Passing current_text to demo_buffer_add_text().
3. Handling a null text input safely with a default fallback.

Assisted-by: Gemini
2026-09-10 16:45:59 -06:00
..
2026-03-30 22:35:10 -06:00