shithub: freetype+ttf2subf

Download patch

ref: c14ae9c5fd35342ca37523761f681656cbba07bb
parent: 8de39a7919ad1bbd433dd62810c91272b7095455
author: Alexei Podtelezhnikov <[email protected]>
date: Sat Oct 10 18:28:26 EDT 2015

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

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-10  Alexei Podtelezhnikov  <[email protected]>
+
+	* src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow
+	(#46149).
+
 2015-10-10  Werner Lemberg  <[email protected]>
 
 	[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  <[email protected]>
+2015-10-06  Alexei Podtelezhnikov  <[email protected]>
 
 	[smooth] Faster alternative line renderer.
 
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -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;
       }