* src/winfonts/winfnt.c (FNT_Face_Init): Correct reallocation.

This commit is contained in:
Alexei Podtelezhnikov 2021-09-28 22:57:58 -04:00
parent 12ef831fc3
commit dd0ccdc3d3
1 changed files with 4 additions and 3 deletions

View File

@ -897,9 +897,10 @@
font->family_name[family_size] = '\0';
if ( FT_REALLOC( font->family_name,
family_size,
ft_strlen( font->family_name ) + 1 ) )
/* shrink it to the actual length */
if ( FT_QREALLOC( font->family_name,
family_size + 1,
ft_strlen( font->family_name ) + 1 ) )
goto Fail;
root->family_name = font->family_name;