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

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