[Fontconfig] fontconfig: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue May 12 11:03:23 UTC 2020


 src/fcfreetype.c |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 6edaaa4d1823518a97fb4cc3004d110b1046f742
Author: Jonathan Kew <jfkthame at googlemail.com>
Date:   Tue Apr 28 16:50:49 2020 +0000

    Set name_mapping to NULL after freeing
    
    To avoid risk of double-free.
    
    Fixes #237.

diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index cd8fa43..bfbd5d7 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -1627,7 +1627,10 @@ FcFreeTypeQueryFaceInternal (const FT_Face  face,
 	}
     }
     if (!nm_share)
+    {
 	free (name_mapping);
+	name_mapping = NULL;
+    }
 
     if (!nfamily && face->family_name &&
 	FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->family_name, (FcChar8 *) "") != 0)


More information about the Fontconfig mailing list