fontconfig: Branch 'fc-2-12'

[email protected] (Akira TAGOH)
Newsgroups gmane.comp.fonts.fontconfig
Message-ID <[email protected]>
 src/fccache.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 665584a19b0ec227c93643ffb0540d11ac8ecf7f
Author: Akira TAGOH <[email protected]>
Date:   Tue Nov 14 20:55:24 2017 +0900

    Validate cache more carefully
    
    Reject caches when FcPattern isn't a constant.
    This is usually unlikely to happen but reported.
    I've decided to add more validation since this isn't reproducible
    and easy to have a workaround rather than investigating 'why'.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=103237

diff --git a/src/fccache.c b/src/fccache.c
index 6f3c68a..c59ea19 100644
--- a/src/fccache.c
+++ b/src/fccache.c
@@ -646,7 +646,8 @@ FcCacheOffsetsValid (FcCache *cache)
                 (char *) font > end - sizeof (FcFontSet) ||
                 font->elts_offset < 0 ||
                 font->elts_offset > end - (char *) font ||
-                font->num > (end - (char *) font - font->elts_offset) / sizeof (FcPatternElt))
+                font->num > (end - (char *) font - font->elts_offset) / sizeof (FcPatternElt) ||
+		!FcRefIsConst (&font->ref))
                 return FcFalse;
 
 
_______________________________________________
Fontconfig mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/fontconfig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.