shithub: freetype+ttf2subf

Download patch

ref: b460a50610320c425292518cb5f6341af234e2f9
parent: 232243e7495d142f30d4e024f30eda9ca8655154
author: Werner Lemberg <[email protected]>
date: Sat Jun 19 03:03:40 EDT 2021

[truetype] Fix integer overflow.

Reported as

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

* src/truetype/ttinterp.c (Ins_JMPR): Use `ADD_LONG`.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2021-06-19  Werner Lemberg  <[email protected]>
 
+	[truetype] Fix integer overflow.
+
+	Reported as
+
+	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35312
+
+	* src/truetype/ttinterp.c (Ins_JMPR): Use `ADD_LONG`.
+
+2021-06-19  Werner Lemberg  <[email protected]>
+
 	[autofit] Prevent hinting if there are too many segments.
 
 	This speeds up handling of broken glyphs.
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -3593,7 +3593,7 @@
       return;
     }
 
-    exc->IP += args[0];
+    exc->IP = ADD_LONG( exc->IP, args[0] );
     if ( exc->IP < 0                                             ||
          ( exc->callTop > 0                                    &&
            exc->IP > exc->callStack[exc->callTop - 1].Def->end ) )