shithub: freetype+ttf2subf

Download patch

ref: 13034e54aac631f5ca8b2dd27a64e5ac5c5f6fbc
parent: 4738dcc4df02b14dedfe4c85b2f916d4061dd1bf
author: Werner Lemberg <[email protected]>
date: Sun Aug 26 08:22:51 EDT 2018

* src/pshint/pshalgo.c (psh_hint_overlap): Fix numeric overflow.

Reported as

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

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2018-08-26  Werner Lemberg  <[email protected]>
 
+	* src/pshint/pshalgo.c (psh_hint_overlap): Fix numeric overflow.
+
+	Reported as
+
+	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10057
+
+2018-08-26  Werner Lemberg  <[email protected]>
+
 	Minor tracing adjustments.
 
 	* src/base/ftstream.c (FT_Stream_EnterFrame, FT_Stream_ExitFrame):
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -53,8 +53,8 @@
   psh_hint_overlap( PSH_Hint  hint1,
                     PSH_Hint  hint2 )
   {
-    return hint1->org_pos + hint1->org_len >= hint2->org_pos &&
-           hint2->org_pos + hint2->org_len >= hint1->org_pos;
+    return ADD_INT( hint1->org_pos, hint1->org_len ) >= hint2->org_pos &&
+           ADD_INT( hint2->org_pos, hint2->org_len ) >= hint1->org_pos;
   }