[sanitize] In lookup sanitize don't try to access subtable 0 if it isn't there.

This commit is contained in:
Garret Rieger 2021-11-16 14:34:07 -08:00 committed by Behdad Esfahbod
parent 82a9f54410
commit a75b96f7e5
1 changed files with 1 additions and 1 deletions

View File

@ -1357,7 +1357,7 @@ struct Lookup
if (unlikely (!get_subtables<TSubTable> ().sanitize (c, this, get_type ()))) if (unlikely (!get_subtables<TSubTable> ().sanitize (c, this, get_type ())))
return_trace (false); return_trace (false);
if (unlikely (get_type () == TSubTable::Extension && !c->get_edit_count ())) if (unlikely (get_type () == TSubTable::Extension && subtables && !c->get_edit_count ()))
{ {
/* The spec says all subtables of an Extension lookup should /* The spec says all subtables of an Extension lookup should
* have the same type, which shall not be the Extension type * have the same type, which shall not be the Extension type