[MPlayer-cvslog] r19007 - trunk/libass/ass_render.c

eugeni subversion at mplayerhq.hu
Tue Jul 11 01:57:17 CEST 2006


Author: eugeni
Date: Tue Jul 11 01:57:17 2006
New Revision: 19007

Modified:
   trunk/libass/ass_render.c

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


Modified: trunk/libass/ass_render.c
==============================================================================
--- trunk/libass/ass_render.c	(original)
+++ trunk/libass/ass_render.c	Tue Jul 11 01:57:17 2006
@@ -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
 



More information about the MPlayer-cvslog mailing list