]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/layout/MorphTables2.cpp
ICU-57131.0.1.tar.gz
[apple/icu.git] / icuSources / layout / MorphTables2.cpp
index 8d5f8d120e3e41613e0e7eb911fc3f6332995ec5..96c7058a8f6ab2e4310625253d701bf68962670f 100644 (file)
@@ -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<MorphTableHeader2> &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<MorphSubtableHeader2> &ba
 {
     SubtableProcessor2 *processor = NULL;
 
+    if (LE_FAILURE(success)) return;
+
     switch (SWAPL(coverage) & scfTypeMask2)
     {
     case mstIndicRearrangement: