shithub: freetype+ttf2subf

Download patch

ref: 29c759284e305ec428703c9a5831d0b1fc3497ef
parent: f438e069723c1e7a7a226e05f677a5e17e346a67
author: Werner Lemberg <[email protected]>
date: Sat Jan 27 09:43:43 EST 2018

* src/truetype/ttinterp.c (Ins_GETVARIATION): Avoid NULL reference.

Reported as

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

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2018-01-27  Werner Lemberg  <[email protected]>
 
+	* src/truetype/ttinterp.c (Ins_GETVARIATION): Avoid NULL reference.
+
+	Reported as
+
+	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5736
+
+2018-01-27  Werner Lemberg  <[email protected]>
+
 	* src/truetype/ttgxvar.c (tt_set_mm_blend): Minor.
 
 2018-01-27  Werner Lemberg  <[email protected]>
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -7532,8 +7532,16 @@
       return;
     }
 
-    for ( i = 0; i < num_axes; i++ )
-      args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */
+    if ( coords )
+    {
+      for ( i = 0; i < num_axes; i++ )
+        args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */
+    }
+    else
+    {
+      for ( i = 0; i < num_axes; i++ )
+        args[i] = 0;
+    }
   }