shithub: freetype+ttf2subf

Download patch

ref: ca799e9be52526739691f120285a27b91fd15d68
parent: abeb28f161bc11be4fcdb8af50ab4b736d34a3e5
author: Werner Lemberg <[email protected]>
date: Mon Jul 3 02:27:52 EDT 2017

[truetype] Integer overflow.

Reported as

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2455

* src/truetype/ttinterp.c (Ins_SCFS): Use SUB_LONG.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2017-07-03  Werner Lemberg  <[email protected]>
+
+	[truetype] Integer overflow.
+
+	Reported as
+
+	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2455
+
+	* src/truetype/ttinterp.c (Ins_SCFS): Use SUB_LONG.
+
 2017-07-01  Alexei Podtelezhnikov  <[email protected]>
 
 	* src/sfnt/sfobjs.c (sfnt_load_face): Ignore No_Unicode_Glyph_Name.
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -4803,7 +4803,7 @@
 
     K = FAST_PROJECT( &exc->zp2.cur[L] );
 
-    exc->func_move( exc, &exc->zp2, L, args[1] - K );
+    exc->func_move( exc, &exc->zp2, L, SUB_LONG( args[1], K ) );
 
     /* UNDOCUMENTED!  The MS rasterizer does that with */
     /* twilight points (confirmed by Greg Hitchcock)   */