summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Wagner <bungeman@chromium.org>2022-05-26 20:27:53 -0400
committerBen Wagner <bungeman@chromium.org>2022-06-01 17:27:38 +0000
commitc26872ed59cba3af2f407b5eefc92fcec92aa52b (patch)
tree9cb5f0f8e0be45137f8db774f289554f57b95b29
parentd6857981239ea5f6e95cb4eb4402307f3527760a (diff)
downloadfreetype2-c26872ed59cba3af2f407b5eefc92fcec92aa52b.tar.gz
[svg] Clear correct flags for doc ownership
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
-rw-r--r--src/base/ftobjs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index eeda69c3e..f66273f3d 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -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