diff --git a/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp index d45ebb65985..c50fbae6157 100644 --- a/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp @@ -151,7 +151,7 @@ le_int32 IndicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 outCharCount; if (fVersion2) { _LETRACE("v2process"); - outCharCount = IndicReordering::v2process(&chars[offset], count, fScriptCode, outChars, glyphStorage); + outCharCount = IndicReordering::v2process(&chars[offset], count, fScriptCode, outChars, glyphStorage, success); } else { _LETRACE("reorder"); outCharCount = IndicReordering::reorder(&chars[offset], count, fScriptCode, outChars, glyphStorage, &fMPreFixups, success); diff --git a/jdk/src/share/native/sun/font/layout/IndicReordering.cpp b/jdk/src/share/native/sun/font/layout/IndicReordering.cpp index 7753e246535..22bbb7cf839 100644 --- a/jdk/src/share/native/sun/font/layout/IndicReordering.cpp +++ b/jdk/src/share/native/sun/font/layout/IndicReordering.cpp @@ -1096,9 +1096,13 @@ void IndicReordering::finalReordering(LEGlyphStorage &glyphStorage, le_int32 cou le_int32 IndicReordering::v2process(const LEUnicode *chars, le_int32 charCount, le_int32 scriptCode, - LEUnicode *outChars, LEGlyphStorage &glyphStorage) + LEUnicode *outChars, LEGlyphStorage &glyphStorage, LEErrorCode& success) { const IndicClassTable *classTable = IndicClassTable::getScriptClassTable(scriptCode); + if (classTable == NULL) { + success = LE_MEMORY_ALLOCATION_ERROR; + return 0; + } DynamicProperties dynProps[INDIC_BLOCK_SIZE]; IndicReordering::getDynamicProperties(dynProps,classTable); diff --git a/jdk/src/share/native/sun/font/layout/IndicReordering.h b/jdk/src/share/native/sun/font/layout/IndicReordering.h index f90bf1ba224..ca77fe0c64a 100644 --- a/jdk/src/share/native/sun/font/layout/IndicReordering.h +++ b/jdk/src/share/native/sun/font/layout/IndicReordering.h @@ -181,7 +181,7 @@ public: static void adjustMPres(MPreFixups *mpreFixups, LEGlyphStorage &glyphStorage, LEErrorCode& success); static le_int32 v2process(const LEUnicode *theChars, le_int32 charCount, le_int32 scriptCode, - LEUnicode *outChars, LEGlyphStorage &glyphStorage); + LEUnicode *outChars, LEGlyphStorage &glyphStorage, LEErrorCode& success); static const FeatureMap *getFeatureMap(le_int32 &count);