summaryrefslogtreecommitdiffstats
path: root/libass
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-10 23:57:17 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-10 23:57:17 +0000
commit2a6f4c3444a1612ac2cd70c134b1248e2b91f8c5 (patch)
tree9ba85de9c8948c7db7bc20892cfd86642c3efb37 /libass
parent6127b2c08f3ae13c526ca894e30b14afa89b0f15 (diff)
downloadmpv-2a6f4c3444a1612ac2cd70c134b1248e2b91f8c5.tar.bz2
mpv-2a6f4c3444a1612ac2cd70c134b1248e2b91f8c5.tar.xz
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
Diffstat (limited to 'libass')
-rw-r--r--libass/ass_render.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 1723394830..a34b653878 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -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