# HG changeset patch # User eugeni # Date 1157392348 0 # Node ID 042680f89e7d4923e6c88d52fe4d26fae08bd93c # Parent 042e0009a1c063e4994df0d2171ee826258e6903 Fix possible unallocated memory read in libass line wrapping code. diff -r 042e0009a1c0 -r 042680f89e7d libass/ass_render.c --- a/libass/ass_render.c Mon Sep 04 09:50:11 2006 +0000 +++ b/libass/ass_render.c Mon Sep 04 17:52:28 2006 +0000 @@ -1349,9 +1349,9 @@ 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);