Aric Stewart : gdi32: Do not install fonts with a family name that is too long.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jan 20 15:20:10 CST 2015
Module: wine
Branch: master
Commit: ecbda5686dfc0bae156fd3cb489369f79ba8fff2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ecbda5686dfc0bae156fd3cb489369f79ba8fff2
Author: Aric Stewart <aric at codeweavers.com>
Date: Mon Jan 19 08:11:51 2015 -0600
gdi32: Do not install fonts with a family name that is too long.
---
dlls/gdi32/freetype.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 62e19a5..5122fb5 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -2024,6 +2024,14 @@ static void AddFaceToList(FT_Face ft_face, const char *file, void *font_data_ptr
face = create_face( ft_face, face_index, file, font_data_ptr, font_data_size, flags );
family = get_family( ft_face, flags & ADDFONT_VERTICAL_FONT );
+ if (strlenW(family->FamilyName) >= LF_FACESIZE)
+ {
+ ERR("Ignoring %s because name is too long\n", debugstr_w(family->FamilyName));
+ release_face( face );
+ release_family( family );
+ return;
+ }
+
if (insert_face_in_family_list( face, family ))
{
if (flags & ADDFONT_ADD_TO_CACHE)
More information about the wine-cvs
mailing list