From 7146718bef81492e13aede0a2801cda1da41ce35 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 11 Dec 2018 23:44:29 -0500 Subject: [PATCH] Minor fix re sanitize of Lookup subtables We were dereferencing Null pointers and trying to sanitize them, which is not necessary... --- src/hb-ot-layout-common.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index cc1af15..ba6fab0 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -693,7 +693,9 @@ struct Lookup unsigned int lookup_type = get_type (); TRACE_DISPATCH (this, lookup_type); unsigned int count = get_subtable_count (); - for (unsigned int i = 0; i < count; i++) { + for (unsigned int i = 0; i < count; i++) + { + if (unlikely (!subTable.arrayZ[i])) continue; typename context_t::return_t r = get_subtable (i).dispatch (c, lookup_type); if (c->stop_sublookup_iteration (r)) return_trace (r); -- 2.7.4