Commit 2fe272aca62ff925f1f29d81268f2c4629f250da

Werner Lemberg 2017-12-18T19:40:07

* src/truetype/ttgxvar.c (tt_face_vary_cvt): Add size guard (#52688).

diff --git a/ChangeLog b/ChangeLog
index 9cdb5e5..2ef631b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2017-12-18  Werner Lemberg  <wl@gnu.org>
 
+	* src/truetype/ttgxvar.c (tt_face_vary_cvt): Add size guard (#52688).
+
+2017-12-18  Werner Lemberg  <wl@gnu.org>
+
 	[truetype] Fix previous commit.
 
 	* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Correctly handle
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 0d4872f..221f572 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -3110,7 +3110,10 @@
                                         table_len,
                                         point_count == 0 ? face->cvt_size
                                                          : point_count );
-      if ( !points || !deltas )
+
+      if ( !points                                                        ||
+           !deltas                                                        ||
+           ( localpoints == ALL_POINTS && point_count != face->cvt_size ) )
         ; /* failure, ignore it */
 
       else if ( localpoints == ALL_POINTS )