Blame SOURCES/0079-src-truetype-ttgxvar.c-TT_Get_MM_Var-Fix-thinko.patch

689293
From 7e50824288fac5a36c2938fdb3e1c949ea53f982 Mon Sep 17 00:00:00 2001
689293
From: Werner Lemberg <wl@gnu.org>
689293
Date: Tue, 1 Aug 2017 12:44:35 +0200
689293
Subject: [PATCH 079/132] * src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix thinko.
689293
689293
---
689293
 ChangeLog               | 4 ++++
689293
 include/freetype/ftmm.h | 3 ++-
689293
 src/truetype/ttgxvar.c  | 4 +++-
689293
 3 files changed, 9 insertions(+), 2 deletions(-)
689293
689293
diff --git a/include/freetype/ftmm.h b/include/freetype/ftmm.h
689293
index 1f48a4945..b1bc1ed82 100644
689293
--- a/include/freetype/ftmm.h
689293
+++ b/include/freetype/ftmm.h
689293
@@ -178,7 +178,8 @@ FT_BEGIN_HEADER
689293
   /*    strid  :: The entry in `name' table identifying this instance.     */
689293
   /*                                                                       */
689293
   /*    psid   :: The entry in `name' table identifying a PostScript name  */
689293
-  /*              for this instance.  Value 0 indicates a missing entry.   */
689293
+  /*              for this instance.  Value 0xFFFF indicates a missing     */
689293
+  /*              entry.                                                   */
689293
   /*                                                                       */
689293
   typedef struct  FT_Var_Named_Style_
689293
   {
689293
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
689293
index df42b3bfd..5a87df139 100644
689293
--- a/src/truetype/ttgxvar.c
689293
+++ b/src/truetype/ttgxvar.c
689293
@@ -2165,9 +2165,11 @@
689293
         for ( j = 0; j < fvar_head.axisCount; j++, c++ )
689293
           *c = FT_GET_LONG();
689293
 
689293
-        /* valid psid values are 6 and [256;32767] */
689293
+        /* valid psid values are 6, [256;32767], and 0xFFFF */
689293
         if ( usePsName )
689293
           ns->psid = FT_GET_USHORT();
689293
+        else
689293
+          ns->psid = 0xFFFF;
689293
 
689293
         ft_var_to_normalized( face,
689293
                               fvar_head.axisCount,
689293
-- 
689293
2.13.5
689293