From cec95a2d2684de4a9f473b71037108047d404d9d Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Mon, 7 Oct 2024 21:06:56 +0300 Subject: [PATCH] Try to fix heap-buffer-overflow --- src/OT/Color/COLR/COLR.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OT/Color/COLR/COLR.hh b/src/OT/Color/COLR/COLR.hh index 353f6014f..10b172c98 100644 --- a/src/OT/Color/COLR/COLR.hh +++ b/src/OT/Color/COLR/COLR.hh @@ -2570,8 +2570,8 @@ struct COLR bool paint_glyph (hb_font_t *font, hb_codepoint_t glyph, hb_paint_funcs_t *funcs, void *data, unsigned int palette_index, hb_color_t foreground, bool clip = true) const { - ItemVarStoreInstancer instancer (varStore ? &(this+varStore): nullptr, - varIdxMap ? &(this+varIdxMap): nullptr, + ItemVarStoreInstancer instancer (has_var_store() ? &(this+varStore): nullptr, + has_delta_set_index_map() ? &(this+varIdxMap): nullptr, hb_array (font->coords, font->num_coords)); hb_paint_context_t c (this, funcs, data, font, palette_index, foreground, instancer); c.current_glyphs.add (glyph);