[subset] Fix potential out of bounds write setting overlap flag on composite glyphs.
This commit is contained in:
parent
3f9226da37
commit
823f32a0e2
|
@ -714,8 +714,11 @@ struct glyf
|
|||
|
||||
void set_overlaps_flag ()
|
||||
{
|
||||
const_cast<CompositeGlyphChain &> (StructAfter<CompositeGlyphChain, GlyphHeader> (header))
|
||||
.set_overlaps_flag ();
|
||||
CompositeGlyphChain& glyph_chain = const_cast<CompositeGlyphChain &> (
|
||||
StructAfter<CompositeGlyphChain, GlyphHeader> (header));
|
||||
if (!bytes.check_range(&glyph_chain, CompositeGlyphChain::min_size))
|
||||
return;
|
||||
glyph_chain.set_overlaps_flag ();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue