From d0adc80965506810820f9ec165b8df80cc8907e3 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 2 Jan 2016 13:25:18 +0000 Subject: [PATCH] Check magicNumber in head table during sanitize --- src/hb-ot-head-table.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-head-table.hh b/src/hb-ot-head-table.hh index fc351cfb4..60644be10 100644 --- a/src/hb-ot-head-table.hh +++ b/src/hb-ot-head-table.hh @@ -55,7 +55,9 @@ struct head inline bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - return_trace (c->check_struct (this) && likely (version.major == 1)); + return_trace (c->check_struct (this) && + version.major == 1 && + magicNumber == 0x5F0F3CF5u); } protected: