Skip to content

Commit

Permalink
[svg] Clear correct flags for doc ownership
Browse files Browse the repository at this point in the history
This issue was discovered with an SVG based font with some documents
compressed and other uncompressed. After loading the first compressed
document the ownership flag on the glyph slot was set to true but never
set to false. As a result after loading a compressed document a glyph
from an uncompressed document would load fine, but when this glyph slot
was cleared it would try to free its document resulting in a wild free.

* src/base/ftobjs.c (ft_glyphslot_clear): clear correct flags

Fixes: #1162
  • Loading branch information
bungeman committed Jun 1, 2022
1 parent d685798 commit c26872e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/base/ftobjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@


FT_FREE( doc->svg_document );
slot->internal->load_flags &= ~FT_GLYPH_OWN_GZIP_SVG;
slot->internal->flags &= ~FT_GLYPH_OWN_GZIP_SVG;
}
}
#endif
Expand Down

0 comments on commit c26872e

Please sign in to comment.