[HB] Avoid infinite recusion in Extension sanitize()

This commit is contained in:
Behdad Esfahbod 2009-08-04 21:35:32 -04:00
parent d60bb8ca2a
commit 5ff4e13143
2 changed files with 2 additions and 0 deletions

View File

@ -1526,6 +1526,7 @@ inline bool ExtensionPos::sanitize (SANITIZE_ARG_DEF)
{ {
return Extension::sanitize (SANITIZE_ARG) && return Extension::sanitize (SANITIZE_ARG) &&
(&(Extension::get_subtable ()) == &Null(LookupSubTable) || (&(Extension::get_subtable ()) == &Null(LookupSubTable) ||
get_type () == PosLookupSubTable::Extension ||
DECONST_CAST (PosLookupSubTable, get_subtable (), 0).sanitize (SANITIZE_ARG)); DECONST_CAST (PosLookupSubTable, get_subtable (), 0).sanitize (SANITIZE_ARG));
} }

View File

@ -863,6 +863,7 @@ inline bool ExtensionSubst::sanitize (SANITIZE_ARG_DEF)
{ {
return Extension::sanitize (SANITIZE_ARG) && return Extension::sanitize (SANITIZE_ARG) &&
(&(Extension::get_subtable ()) == &Null(LookupSubTable) || (&(Extension::get_subtable ()) == &Null(LookupSubTable) ||
get_type () == SubstLookupSubTable::Extension ||
DECONST_CAST (SubstLookupSubTable, get_subtable (), 0).sanitize (SANITIZE_ARG)); DECONST_CAST (SubstLookupSubTable, get_subtable (), 0).sanitize (SANITIZE_ARG));
} }