[vlc-devel] commit: Fixed a segfault when trying to render a unbreakable string. ( Laurent Aimar )
git version control
git at videolan.org
Wed Sep 17 20:56:07 CEST 2008
vlc | branch: 0.9-bugfix | Laurent Aimar <fenrir at videolan.org> | Wed Sep 17 20:24:34 2008 +0200| [6fe9f71b974394c897bd12d48e93c4c471e83d57] | committer: Jean-Baptiste Kempf
Fixed a segfault when trying to render a unbreakable string.
(cherry picked from commit 181756989468eeecda39c28d194de9afa2205bef)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6fe9f71b974394c897bd12d48e93c4c471e83d57
---
modules/misc/freetype.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c
index 8d42bc0..4006739 100644
--- a/modules/misc/freetype.c
+++ b/modules/misc/freetype.c
@@ -1724,10 +1724,9 @@ static int RenderTag( filter_t *p_filter, FT_Face p_face, int i_font_color,
glyph_size.xMin + ((FT_BitmapGlyph)tmp_glyph)->left;
if( line.xMax > (int)p_filter->fmt_out.video.i_visible_width - 20 )
{
- while( --i > *pi_start )
- {
+ for( ; i >= *pi_start; i-- )
FT_Done_Glyph( (FT_Glyph)p_line->pp_glyphs[ i ] );
- }
+ i = *pi_start;
while( psz_unicode > psz_unicode_start && *psz_unicode != ' ' )
{
@@ -1751,8 +1750,6 @@ static int RenderTag( filter_t *p_filter, FT_Face p_face, int i_font_color,
p_result->x = __MAX( p_result->x, line.xMax );
p_result->y = __MAX( p_result->y, __MAX( p_line->i_height,
i_yMax - i_yMin ) );
-
- *pi_start = i;
return VLC_SUCCESS;
}
else
More information about the vlc-devel
mailing list