From 06ffbd9d7d36a00fc3f1521fef2d9b64ab8150c5 Mon Sep 17 00:00:00 2001 From: eugeni Date: Mon, 4 Sep 2006 17:52:28 +0000 Subject: Fix possible unallocated memory read in libass line wrapping code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19669 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libass/ass_render.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libass') diff --git a/libass/ass_render.c b/libass/ass_render.c index 62a484920a..0d774dd987 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1349,9 +1349,9 @@ static void wrap_lines_smart(int max_text_width) w = s2; do { --w; } while ((w > s1) && (w->symbol == ' ')); - do { --w; } while ((w > s1) && (w->symbol != ' ')); + while ((w > s1) && (w->symbol != ' ')) { --w; } e1 = w; - do { --e1; } while ((e1 > s1) && (e1->symbol == ' ')); + while ((e1 > s1) && (e1->symbol == ' ')) { --e1; } if (w->symbol == ' ') ++w; l1 = ((s2-1)->bbox.xMax + (s2-1)->pos.x) - (s1->bbox.xMin + s1->pos.x); -- cgit v1.2.3