[subset] Fix potential out of bounds write setting overlap flag on composite glyphs.

pull/3663/head
Garret Rieger 3 years ago committed by Behdad Esfahbod
parent 3f9226da37
commit 823f32a0e2
  1. 7
      src/hb-ot-glyf-table.hh

@ -714,8 +714,11 @@ struct glyf
void set_overlaps_flag () void set_overlaps_flag ()
{ {
const_cast<CompositeGlyphChain &> (StructAfter<CompositeGlyphChain, GlyphHeader> (header)) CompositeGlyphChain& glyph_chain = const_cast<CompositeGlyphChain &> (
.set_overlaps_flag (); StructAfter<CompositeGlyphChain, GlyphHeader> (header));
if (!bytes.check_range(&glyph_chain, CompositeGlyphChain::min_size))
return;
glyph_chain.set_overlaps_flag ();
} }
}; };

Loading…
Cancel
Save