X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/a0b4f637ba1a6c3c5651b61a69303b029bacf7d3..2ca993e82fb37b597a3c73ecd1586a139a6579c5:/icuSources/layout/MorphTables2.cpp?ds=sidebyside diff --git a/icuSources/layout/MorphTables2.cpp b/icuSources/layout/MorphTables2.cpp index 8d5f8d12..96c7058a 100644 --- a/icuSources/layout/MorphTables2.cpp +++ b/icuSources/layout/MorphTables2.cpp @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. and others 1998 - 2013 - All Rights Reserved + * (C) Copyright IBM Corp. and others 1998 - 2015 - All Rights Reserved * */ @@ -164,6 +164,7 @@ void MorphTableHeader2::process(const LEReferenceTo &base, LE if(subtable>0) { le_uint32 length = SWAPL(subtableHeader->length); subtableHeader.addOffset(length, success); // Don't addOffset for the last entry. + if (LE_FAILURE(success)) break; } le_uint32 coverage = SWAPL(subtableHeader->coverage); FeatureFlags subtableFeatures = SWAPL(subtableHeader->subtableFeatures); @@ -179,6 +180,8 @@ void MorphSubtableHeader2::process(const LEReferenceTo &ba { SubtableProcessor2 *processor = NULL; + if (LE_FAILURE(success)) return; + switch (SWAPL(coverage) & scfTypeMask2) { case mstIndicRearrangement: