提交 2d946734 编写于 作者: B Behdad Esfahbod

[mort] Fix version check in sanitize

上级 c2527a1b
......@@ -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<Types> *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. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册