# HG changeset patch # User eugeni # Date 1152575837 0 # Node ID da05237044c24bdd579c6e34c719fd648f0fd040 # Parent 31b7033c573e7a5d0bb9f65cce22410f3f2d4d39 Ignoring FT_Glyph_Stroke() errors can potentially lead to double free(). diff -r 31b7033c573e -r da05237044c2 libass/ass_render.c --- a/libass/ass_render.c Mon Jul 10 23:55:40 2006 +0000 +++ b/libass/ass_render.c Mon Jul 10 23:57:17 2006 +0000 @@ -1120,7 +1120,11 @@ 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