ref: 3e4b79970e0681bd2481392420a0eb4dc7820b70
parent: d1b6c6e2119eb526c1420996f00fe5904de1b25b
author: Werner Lemberg <[email protected]>
date: Mon Sep 11 04:51:44 EDT 2017
* src/sfnt/ttkern.c (tt_face_load_kern): Reject format 2 tables. Reported by Behdad.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-09-11 Werner Lemberg <[email protected]>
+
+ * src/sfnt/ttkern.c (tt_face_load_kern): Reject format 2 tables.
+
+ Reported by Behdad.
+
2017-09-09 Werner Lemberg <[email protected]>
[autofit] Improve communication with ftgrid.
--- a/src/sfnt/ttkern.c
+++ b/src/sfnt/ttkern.c
@@ -85,7 +85,7 @@
for ( nn = 0; nn < num_tables; nn++ )
{
- FT_UInt num_pairs, length, coverage;
+ FT_UInt num_pairs, length, coverage, format;
FT_Byte* p_next;
FT_UInt32 mask = (FT_UInt32)1UL << nn;
@@ -106,6 +106,12 @@
if ( p_next > p_limit ) /* handle broken table */
p_next = p_limit;
+
+ format = coverage >> 8;
+
+ /* we currently only support format 0 kerning tables */
+ if ( format != 0 )
+ goto NextTable;
/* only use horizontal kerning tables */
if ( ( coverage & 3U ) != 0x0001 ||