shithub: freetype+ttf2subf

Download patch

ref: 5e02965905e64e543a92d8d29fba32c86b350104
parent: ec439711b1d32ea8182fa98df73166120b7b0cb0
author: Werner Lemberg <[email protected]>
date: Tue Dec 25 14:24:06 EST 2018

* src/psaux/cffdecode.c (cff_operaor_seac): Fix numeric overflow.

Reported as

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

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-12-25  Werner Lemberg  <[email protected]>
+
+	* src/psaux/cffdecode.c (cff_operaor_seac): Fix numeric overflow.
+
+	Reported as
+
+	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11915
+
 2018-12-12  Werner Lemberg  <[email protected]>
 
 	[gxvalid] Fix compiler warnings.
--- a/src/psaux/cffdecode.c
+++ b/src/psaux/cffdecode.c
@@ -235,8 +235,8 @@
       return FT_THROW( Syntax_Error );
     }
 
-    adx += decoder->builder.left_bearing.x;
-    ady += decoder->builder.left_bearing.y;
+    adx = ADD_LONG( adx, decoder->builder.left_bearing.x );
+    ady = ADD_LONG( ady, decoder->builder.left_bearing.y );
 
 #ifdef FT_CONFIG_OPTION_INCREMENTAL
     /* Incremental fonts don't necessarily have valid charsets.        */