freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master c26872ed5: [svg] Clear correct flags for doc ownershi


From: Werner Lemberg
Subject: [freetype2] master c26872ed5: [svg] Clear correct flags for doc ownership
Date: Thu, 2 Jun 2022 11:49:57 -0400 (EDT)

branch: master
commit c26872ed59cba3af2f407b5eefc92fcec92aa52b
Author: Ben Wagner <bungeman@chromium.org>
Commit: Ben Wagner <bungeman@chromium.org>

    [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
---
 src/base/ftobjs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]