gdi32: Do not install fonts with a family name that is too long.

This commit is contained in:
Aric Stewart 2015-01-19 08:11:51 -06:00 committed by Alexandre Julliard
parent 7cbb683705
commit ecbda5686d
1 changed files with 8 additions and 0 deletions

View File

@ -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)