* src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow (#46149).

This commit is contained in:
Alexei Podtelezhnikov 2015-10-10 22:28:26 -04:00
parent 8de39a7919
commit c14ae9c5fd
2 changed files with 13 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2015-10-10 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow
(#46149).
2015-10-10 Werner Lemberg <wl@gnu.org>
[sfnt] Fix infinite loops with broken cmaps (#46167).
@ -72,7 +77,7 @@
* src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files.
2015-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
2015-10-06 Alexei Podtelezhnikov <apodtele@gmail.com>
[smooth] Faster alternative line renderer.

View File

@ -1074,13 +1074,16 @@
FT_Int last = outline->contours[c];
v_prev = points[last];
v_prev.x = points[last].x >> xshift;
v_prev.y = points[last].y >> yshift;
for ( n = first; n <= last; n++ )
{
v_cur = points[n];
area += ( ( v_cur.y - v_prev.y ) >> yshift ) *
( ( v_cur.x + v_prev.x ) >> xshift );
v_cur.x = points[n].x >> xshift;
v_cur.y = points[n].y >> yshift;
area += ( v_cur.y - v_prev.y ) * ( v_cur.x + v_prev.x );
v_prev = v_cur;
}