This commit is contained in:
Behdad Esfahbod 2010-05-04 14:49:45 -04:00
parent be74284673
commit 26bfcb64e4
2 changed files with 5 additions and 7 deletions

View File

@ -348,9 +348,8 @@ struct GDEF
inline bool sanitize (SANITIZE_ARG_DEF) {
TRACE_SANITIZE ();
if (!SANITIZE (version)) return false;
if (unlikely (version.major != 1)) return false;
return SANITIZE_THIS2 (glyphClassDef, attachList) &&
return SANITIZE (version) && likely (version.major == 1) &&
SANITIZE_THIS2 (glyphClassDef, attachList) &&
SANITIZE_THIS2 (ligCaretList, markAttachClassDef) &&
(version < 0x00010002 || SANITIZE_THIS (markGlyphSetsDef[0]));
}

View File

@ -913,10 +913,9 @@ struct GSUBGPOS
inline bool sanitize (SANITIZE_ARG_DEF) {
TRACE_SANITIZE ();
if (!SANITIZE (version)) return false;
if (unlikely (version.major != 1)) return false;
return SANITIZE_THIS (scriptList)
&& SANITIZE_THIS (featureList)
return SANITIZE (version) && likely (version.major == 1)
&& SANITIZE_THIS (scriptList)
&& SANITIZE_THIS (featureList)
&& SANITIZE_THIS (lookupList);
}