diff --git a/jdk/src/java.desktop/share/native/libfontmanager/layout/CursiveAttachmentSubtables.cpp b/jdk/src/java.desktop/share/native/libfontmanager/layout/CursiveAttachmentSubtables.cpp index 63583289fd7..f2c9f95ac70 100644 --- a/jdk/src/java.desktop/share/native/libfontmanager/layout/CursiveAttachmentSubtables.cpp +++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/CursiveAttachmentSubtables.cpp @@ -45,6 +45,9 @@ le_uint32 CursiveAttachmentSubtable::process(const LEReferenceTo + entryExitRecordsArrayRef(base, success, entryExitRecords, coverageIndex); + if (coverageIndex < 0 || coverageIndex >= eeCount || LE_FAILURE(success)) { glyphIterator->setCursiveGlyph(); return 0; diff --git a/jdk/src/java.desktop/share/native/libfontmanager/layout/Features.cpp b/jdk/src/java.desktop/share/native/libfontmanager/layout/Features.cpp index b44ae2e8e87..6c6bcc8b331 100644 --- a/jdk/src/java.desktop/share/native/libfontmanager/layout/Features.cpp +++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/Features.cpp @@ -40,6 +40,9 @@ U_NAMESPACE_BEGIN LEReferenceTo FeatureListTable::getFeatureTable(const LETableReference &base, le_uint16 featureIndex, LETag *featureTag, LEErrorCode &success) const { + LEReferenceToArrayOf + featureRecordArrayRef(base, success, featureRecordArray, featureIndex); + if (featureIndex >= SWAPW(featureCount) || LE_FAILURE(success)) { return LEReferenceTo(); } diff --git a/jdk/src/java.desktop/share/native/libfontmanager/layout/LigatureSubstSubtables.cpp b/jdk/src/java.desktop/share/native/libfontmanager/layout/LigatureSubstSubtables.cpp index 9e7120eb64b..8e0e7cdd2b8 100644 --- a/jdk/src/java.desktop/share/native/libfontmanager/layout/LigatureSubstSubtables.cpp +++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/LigatureSubstSubtables.cpp @@ -64,6 +64,9 @@ le_uint32 LigatureSubstitutionSubtable::process(const LETableReference &base, Gl LEReferenceTo ligTable(ligSetTable, success, ligTableOffset); if(LE_FAILURE(success)) { return 0; } le_uint16 compCount = SWAPW(ligTable->compCount) - 1; + LEReferenceToArrayOf + componentArrayRef(base, success, ligTable->componentArray, compCount); + if (LE_FAILURE(success)) { return 0; } le_int32 startPosition = glyphIterator->getCurrStreamPosition(); TTGlyphID ligGlyph = SWAPW(ligTable->ligGlyph); le_uint16 comp; diff --git a/jdk/src/java.desktop/share/native/libfontmanager/layout/MultipleSubstSubtables.cpp b/jdk/src/java.desktop/share/native/libfontmanager/layout/MultipleSubstSubtables.cpp index 5ff16fe48b2..5ed9a3a532c 100644 --- a/jdk/src/java.desktop/share/native/libfontmanager/layout/MultipleSubstSubtables.cpp +++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/MultipleSubstSubtables.cpp @@ -61,6 +61,8 @@ le_uint32 MultipleSubstitutionSubtable::process(const LETableReference &base, Gl le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); le_uint16 seqCount = SWAPW(sequenceCount); + LEReferenceToArrayOf + sequenceTableOffsetArrayRef(base, success, sequenceTableOffsetArray, seqCount); if (LE_FAILURE(success)) { return 0;