X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/4388f060552cc537e71e957d32f35e9d75a61233..ef6cf650f4a75c3f97de06b51fa104f2069b9ea2:/icuSources/layout/IndicReordering.cpp?ds=inline diff --git a/icuSources/layout/IndicReordering.cpp b/icuSources/layout/IndicReordering.cpp index d64d8ed0..1ebc94a6 100644 --- a/icuSources/layout/IndicReordering.cpp +++ b/icuSources/layout/IndicReordering.cpp @@ -1,6 +1,6 @@ /* / * - * (C) Copyright IBM Corp. 1998-2012 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2015 - All Rights Reserved * */ @@ -633,6 +633,11 @@ le_int32 IndicReordering::reorder(const LEUnicode *chars, le_int32 charCount, le MPreFixups *mpreFixups = NULL; const IndicClassTable *classTable = IndicClassTable::getScriptClassTable(scriptCode); + if (classTable==NULL) { + success = LE_INTERNAL_ERROR; + return 0; + } + if (classTable->scriptFlags & SF_MPRE_FIXUP) { mpreFixups = new MPreFixups(charCount); if (mpreFixups == NULL) { @@ -1069,6 +1074,9 @@ le_int32 IndicReordering::v2process(const LEUnicode *chars, le_int32 charCount, LEUnicode *outChars, LEGlyphStorage &glyphStorage) { const IndicClassTable *classTable = IndicClassTable::getScriptClassTable(scriptCode); + if (classTable == NULL) { + return 0; + } DynamicProperties dynProps[INDIC_BLOCK_SIZE]; IndicReordering::getDynamicProperties(dynProps,classTable);