From dd347eb4e2cf3bb6b04a1053e2b602aae8e5381f Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Wed, 23 Jul 2025 19:22:19 +0000 Subject: [PATCH] [VARC] fix potential unitialized value use in get_extents_without_var_scaled. Callers of get_extents_without_var_scaled assume it will set extents if it has returned true. --- src/OT/glyf/Glyph.hh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/OT/glyf/Glyph.hh b/src/OT/glyf/Glyph.hh index f8a396bf9..a3ec885e6 100644 --- a/src/OT/glyf/Glyph.hh +++ b/src/OT/glyf/Glyph.hh @@ -533,7 +533,11 @@ struct Glyph bool get_extents_without_var_scaled (hb_font_t *font, const glyf_accelerator_t &glyf_accelerator, hb_glyph_extents_t *extents) const { - if (type == EMPTY) return true; /* Empty glyph; zero extents. */ + if (type == EMPTY) + { + *extents = {0, 0, 0, 0}; + return true; /* Empty glyph; zero extents. */ + } return header->get_extents_without_var_scaled (font, glyf_accelerator, gid, extents); }