shithub: freetype+ttf2subf

Download patch

ref: fc15ebe0a629acf769ed8976e3d5b84ee4e01236
parent: a960be9e5e9846e1e4e8d2254e0b405fbf84346b
author: Werner Lemberg <[email protected]>
date: Mon Mar 21 07:15:41 EDT 2022

* src/sfnt/ttkern.c (tt_face_get_kerning): Exit early if no table.

Fixes #1141.

git/fs: mount .git/fs: mount/attach disallowed
--- a/src/sfnt/ttkern.c
+++ b/src/sfnt/ttkern.c
@@ -190,9 +190,15 @@
     FT_Int   result = 0;
     FT_UInt  count, mask;
 
-    FT_Byte*  p       = face->kern_table;
-    FT_Byte*  p_limit = p + face->kern_table_size;
+    FT_Byte*  p;
+    FT_Byte*  p_limit;
 
+
+    if ( !face->kern_table )
+      return result;
+
+    p       = face->kern_table;
+    p_limit = p + face->kern_table_size;
 
     p   += 4;
     mask = 0x0001;