1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-05 13:47:39 +00:00

Ignoring FT_Glyph_Stroke() errors can potentially lead to double free().

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19007 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
eugeni 2006-07-10 23:57:17 +00:00
parent 6127b2c08f
commit 2a6f4c3444

View File

@ -1120,7 +1120,11 @@ static int get_glyph(int index, int symbol, glyph_info_t* info, FT_Vector* advan
info->advance.y = info->glyph->advance.y >> 10;
info->outline_glyph = info->glyph;
FT_Glyph_Stroke( &(info->outline_glyph), render_context.stroker, 0 ); // don't destroy original
error = FT_Glyph_Stroke( &(info->outline_glyph), render_context.stroker, 0 ); // don't destroy original
if (error) {
mp_msg(MSGT_GLOBAL, MSGL_WARN, "FT_Glyph_Stroke error %d \n", error);
FT_Glyph_Copy(info->glyph, &info->outline_glyph);
}
info->bitmap = 0; // outline glyph