From 5ff4e13143c227fa57854c987b5a98e610f89361 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 4 Aug 2009 21:35:32 -0400 Subject: [PATCH] [HB] Avoid infinite recusion in Extension sanitize() --- src/hb-ot-layout-gpos-private.hh | 1 + src/hb-ot-layout-gsub-private.hh | 1 + 2 files changed, 2 insertions(+) diff --git a/src/hb-ot-layout-gpos-private.hh b/src/hb-ot-layout-gpos-private.hh index 4aaefeb8b..292de0d35 100644 --- a/src/hb-ot-layout-gpos-private.hh +++ b/src/hb-ot-layout-gpos-private.hh @@ -1526,6 +1526,7 @@ inline bool ExtensionPos::sanitize (SANITIZE_ARG_DEF) { return Extension::sanitize (SANITIZE_ARG) && (&(Extension::get_subtable ()) == &Null(LookupSubTable) || + get_type () == PosLookupSubTable::Extension || DECONST_CAST (PosLookupSubTable, get_subtable (), 0).sanitize (SANITIZE_ARG)); } diff --git a/src/hb-ot-layout-gsub-private.hh b/src/hb-ot-layout-gsub-private.hh index db608fd4a..9d35e997b 100644 --- a/src/hb-ot-layout-gsub-private.hh +++ b/src/hb-ot-layout-gsub-private.hh @@ -863,6 +863,7 @@ inline bool ExtensionSubst::sanitize (SANITIZE_ARG_DEF) { return Extension::sanitize (SANITIZE_ARG) && (&(Extension::get_subtable ()) == &Null(LookupSubTable) || + get_type () == SubstLookupSubTable::Extension || DECONST_CAST (SubstLookupSubTable, get_subtable (), 0).sanitize (SANITIZE_ARG)); }