提交 210f899a 编写于 作者: B Behdad Esfahbod

[kern] Sanitize 4 bytes, not 2

上级 be2f148d
......@@ -430,7 +430,7 @@ struct kern
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
if (!u.major.sanitize (c)) return_trace (false);
if (!u.version32.sanitize (c)) return_trace (false);
switch (u.major) {
case 0: return_trace (u.ot.sanitize (c));
case 1: return_trace (u.aat.sanitize (c));
......@@ -480,13 +480,13 @@ struct kern
protected:
union {
HBUINT16 major;
HBUINT32 version32;
HBUINT16 major;
KernOT ot;
KernAAT aat;
} u;
public:
DEFINE_SIZE_UNION (2, major);
DEFINE_SIZE_UNION (4, version32);
};
struct kern_accelerator_t : kern::accelerator_t {};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册