summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--src/truetype/ttgxvar.c24
-rw-r--r--src/truetype/ttgxvar.h1
3 files changed, 21 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 7409fb8b7..4a4149049 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2017-01-23 Werner Lemberg <wl@gnu.org>
+ [truetype] Minor updates for OpenType 1.8.1.
+
+ * src/truetype/ttgxvar.h (GX_MVarTable): `axisCount' has been
+ removed frem the specification; it is now reserved.
+
+ * src/truetype/ttgxvar.c (ft_var_load_mvar): Updated.
+ (GX_FVar_Head): Remove `countSizePairs'; the corresponding data
+ field in the `MVAR' table is now reserved.
+ (fvar_fields): Updated.
+
+2017-01-23 Werner Lemberg <wl@gnu.org>
+
[truetype] Avoid segfault for invalid variation data.
* src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Assure
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 8004206b0..084c65cba 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -22,10 +22,6 @@
/* */
/* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6[fgca]var.html */
/* */
- /* The documentation for `fvar' is inconsistent. At one point it says */
- /* that `countSizePairs' should be 3, at another point 2. It should */
- /* be 2. */
- /* */
/* The documentation for `gvar' is not intelligible; `cvar' refers you */
/* to `gvar' and is thus also incomprehensible. */
/* */
@@ -1119,9 +1115,8 @@
if ( FT_NEW( blend->mvar_table ) )
return;
- /* skip value record size */
- if ( FT_READ_USHORT( blend->mvar_table->axisCount ) ||
- FT_STREAM_SKIP( 2 ) ||
+ /* skip reserved entry and value record size */
+ if ( FT_STREAM_SKIP( 4 ) ||
FT_READ_USHORT( blend->mvar_table->valueCount ) ||
FT_READ_USHORT( store_offset ) )
return;
@@ -1613,7 +1608,6 @@
{
FT_Long version;
FT_UShort offsetToData;
- FT_UShort countSizePairs;
FT_UShort axisCount;
FT_UShort axisSize;
FT_UShort instanceCount;
@@ -1680,13 +1674,13 @@
#define FT_STRUCTURE GX_FVar_Head
FT_FRAME_START( 16 ),
- FT_FRAME_LONG ( version ),
- FT_FRAME_USHORT( offsetToData ),
- FT_FRAME_USHORT( countSizePairs ),
- FT_FRAME_USHORT( axisCount ),
- FT_FRAME_USHORT( axisSize ),
- FT_FRAME_USHORT( instanceCount ),
- FT_FRAME_USHORT( instanceSize ),
+ FT_FRAME_LONG ( version ),
+ FT_FRAME_USHORT ( offsetToData ),
+ FT_FRAME_SKIP_SHORT,
+ FT_FRAME_USHORT ( axisCount ),
+ FT_FRAME_USHORT ( axisSize ),
+ FT_FRAME_USHORT ( instanceCount ),
+ FT_FRAME_USHORT ( instanceSize ),
FT_FRAME_END
};
diff --git a/src/truetype/ttgxvar.h b/src/truetype/ttgxvar.h
index bbe240f91..1d908cd91 100644
--- a/src/truetype/ttgxvar.h
+++ b/src/truetype/ttgxvar.h
@@ -194,7 +194,6 @@ FT_BEGIN_HEADER
/* */
typedef struct GX_MVarTableRec_
{
- FT_UShort axisCount;
FT_UShort valueCount;
GX_ItemVarStoreRec itemStore; /* Item Variation Store */