From 2d9467340b1498ccc0cd47bf915b84ab12dfa025 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 30 Oct 2018 19:33:31 -0700 Subject: [PATCH] [mort] Fix version check in sanitize --- src/hb-aat-layout-morx-table.hh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index e619d9e92..a2dd45a03 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -1052,8 +1052,7 @@ struct mortmorx inline bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (!version.sanitize (c) || version < 2 || - !chainCount.sanitize (c)) + if (!version.sanitize (c) || !version || !chainCount.sanitize (c)) return_trace (false); const Chain *chain = &firstChain; @@ -1070,7 +1069,7 @@ struct mortmorx protected: HBUINT16 version; /* Version number of the glyph metamorphosis table. - * 2 or 3. */ + * 1, 2, or 3. */ HBUINT16 unused; /* Set to 0. */ HBUINT32 chainCount; /* Number of metamorphosis chains contained in this * table. */