diff --git a/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp b/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp index b27d4ee5010c9970dd2b3e42d44f097530ac2cda..d27afeae18df4c1b1f4a303082d2a94c00b394c6 100644 --- a/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp +++ b/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp @@ -42,6 +42,10 @@ U_NAMESPACE_BEGIN le_uint32 AlternateSubstitutionSubtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const { + if (LE_FAILURE(success)) { + return 0; + } + // NOTE: For now, we'll just pick the first alternative... LEGlyphID glyph = glyphIterator->getCurrGlyphID(); le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); diff --git a/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp b/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp index 0f230f12e7d58def6d089152727d9d82ecf36d2c..44c2015a902565d0f81b57149128c1a45b337686 100644 --- a/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp +++ b/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp @@ -41,6 +41,10 @@ U_NAMESPACE_BEGIN le_uint32 CursiveAttachmentSubtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { + if (LE_FAILURE(success)) { + return 0; + } + LEGlyphID glyphID = glyphIterator->getCurrGlyphID(); le_int32 coverageIndex = getGlyphCoverage(base, glyphID, success); le_uint16 eeCount = SWAPW(entryExitCount); diff --git a/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp b/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp index 55209409578c246352d6fb0b0a926d4724b3336b..48cdbf49f61809de8789e60b6b664c4cff4657b3 100644 --- a/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp +++ b/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp @@ -42,6 +42,10 @@ U_NAMESPACE_BEGIN le_uint32 LigatureSubstitutionSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const { + if (LE_FAILURE(success)) { + return 0; + } + LEGlyphID glyph = glyphIterator->getCurrGlyphID(); le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); diff --git a/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp b/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp index f8081a9c22324ed037aa62c1c6b7bb8572f0c80f..713de9a6036fee28f9ca9a8959b5e9b3627523c4 100644 --- a/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp +++ b/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp @@ -53,6 +53,10 @@ LEGlyphID MarkToBasePositioningSubtable::findBaseGlyph(GlyphIterator *glyphItera le_int32 MarkToBasePositioningSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { + if (LE_FAILURE(success)) { + return 0; + } + LEGlyphID markGlyph = glyphIterator->getCurrGlyphID(); le_int32 markCoverage = getGlyphCoverage(base, (LEGlyphID) markGlyph, success); diff --git a/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp b/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp index e70f35c50e5bea7d7a2bc038b73a6d3531b9b4f9..106d1a9a495db79b567a7143c7b0f90ab417112d 100644 --- a/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp +++ b/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp @@ -52,6 +52,10 @@ LEGlyphID MarkToLigaturePositioningSubtable::findLigatureGlyph(GlyphIterator *gl le_int32 MarkToLigaturePositioningSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { + if (LE_FAILURE(success)) { + return 0; + } + LEGlyphID markGlyph = glyphIterator->getCurrGlyphID(); le_int32 markCoverage = getGlyphCoverage(base, (LEGlyphID) markGlyph, success); diff --git a/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp b/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp index 0e16a2fced2c808c255b0176c434a3e160291073..4648eb7ef7cc1f4c6f5e505fca3035edee9f3531 100644 --- a/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp +++ b/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp @@ -53,6 +53,10 @@ LEGlyphID MarkToMarkPositioningSubtable::findMark2Glyph(GlyphIterator *glyphIter le_int32 MarkToMarkPositioningSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { + if (LE_FAILURE(success)) { + return 0; + } + LEGlyphID markGlyph = glyphIterator->getCurrGlyphID(); le_int32 markCoverage = getGlyphCoverage(base, (LEGlyphID) markGlyph, success); diff --git a/src/share/native/sun/font/layout/MorphTables.cpp b/src/share/native/sun/font/layout/MorphTables.cpp index 152b94774ba47435024592d11ada90230b6e2beb..cfbb8259274c670b13fddd34769169eaab8adfa4 100644 --- a/src/share/native/sun/font/layout/MorphTables.cpp +++ b/src/share/native/sun/font/layout/MorphTables.cpp @@ -46,8 +46,10 @@ U_NAMESPACE_BEGIN void MorphTableHeader::process(const LETableReference &base, LEGlyphStorage &glyphStorage, LEErrorCode &success) const { - le_uint32 chainCount = SWAPL(this->nChains); - LEReferenceTo chainHeader(base, success, chains); // moving header + if (LE_FAILURE(success)) return; + + le_uint32 chainCount = SWAPL(this->nChains); + LEReferenceTo chainHeader(base, success, chains); // moving header LEReferenceToArrayOf chainHeaderArray(base, success, chains, chainCount); le_uint32 chain; diff --git a/src/share/native/sun/font/layout/PairPositioningSubtables.cpp b/src/share/native/sun/font/layout/PairPositioningSubtables.cpp index 41922b7faf89bce174d41fb0248405a76d5e54ce..5cb30d37af223fe79ae3de57e8af51a772f570be 100644 --- a/src/share/native/sun/font/layout/PairPositioningSubtables.cpp +++ b/src/share/native/sun/font/layout/PairPositioningSubtables.cpp @@ -43,6 +43,10 @@ U_NAMESPACE_BEGIN le_uint32 PairPositioningSubtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { + if (LE_FAILURE(success)) { + return 0; + } + switch(SWAPW(subtableFormat)) { case 0: @@ -74,6 +78,10 @@ le_uint32 PairPositioningSubtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { + if (LE_FAILURE(success)) { + return 0; + } + LEGlyphID firstGlyph = glyphIterator->getCurrGlyphID(); le_int32 coverageIndex = getGlyphCoverage(base, firstGlyph, success); GlyphIterator tempIterator(*glyphIterator); @@ -123,6 +131,10 @@ le_uint32 PairPositioningFormat1Subtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { + if (LE_FAILURE(success)) { + return 0; + } + LEGlyphID firstGlyph = glyphIterator->getCurrGlyphID(); le_int32 coverageIndex = getGlyphCoverage(base, firstGlyph, success); diff --git a/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp b/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp index a8b8d0c64c6fb8003b650e897fbfda9780a73fe9..18523574c1089d42d3b72a2d602b0823c2651923 100644 --- a/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp +++ b/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp @@ -59,6 +59,8 @@ SegmentArrayProcessor::~SegmentArrayProcessor() void SegmentArrayProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { + if (LE_FAILURE(success)) return; + const LookupSegment *segments = segmentArrayLookupTable->segments; le_int32 glyphCount = glyphStorage.getGlyphCount(); le_int32 glyph; diff --git a/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp b/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp index 89222a0cdf0bcc68f6ae6919ed4b5f2b3817679a..ca73c053ebef129172d3ca5b77ea183271b170df 100644 --- a/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp +++ b/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp @@ -59,6 +59,8 @@ SegmentArrayProcessor2::~SegmentArrayProcessor2() void SegmentArrayProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { + if (LE_FAILURE(success)) return; + const LookupSegment *segments = segmentArrayLookupTable->segments; le_int32 glyphCount = glyphStorage.getGlyphCount(); le_int32 glyph; diff --git a/src/share/native/sun/font/layout/SegmentSingleProcessor.cpp b/src/share/native/sun/font/layout/SegmentSingleProcessor.cpp index 42866a5473d020139b5cf5a1f0a940fbf6b2a093..bbbe1456036e9921a7e6751fda3ac785a3df33da 100644 --- a/src/share/native/sun/font/layout/SegmentSingleProcessor.cpp +++ b/src/share/native/sun/font/layout/SegmentSingleProcessor.cpp @@ -59,6 +59,8 @@ SegmentSingleProcessor::~SegmentSingleProcessor() void SegmentSingleProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { + if (LE_FAILURE(success)) return; + const LookupSegment *segments = segmentSingleLookupTable->segments; le_int32 glyphCount = glyphStorage.getGlyphCount(); le_int32 glyph; diff --git a/src/share/native/sun/font/layout/SegmentSingleProcessor2.cpp b/src/share/native/sun/font/layout/SegmentSingleProcessor2.cpp index 557278351801a37e112132d6b0040199d712fc91..d6b182289e4a53628c53438a9ea39996165b3f8f 100644 --- a/src/share/native/sun/font/layout/SegmentSingleProcessor2.cpp +++ b/src/share/native/sun/font/layout/SegmentSingleProcessor2.cpp @@ -60,6 +60,8 @@ SegmentSingleProcessor2::~SegmentSingleProcessor2() void SegmentSingleProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { + if (LE_FAILURE(success)) return; + const LookupSegment *segments = segmentSingleLookupTable->segments; le_int32 glyphCount = glyphStorage.getGlyphCount(); le_int32 glyph; diff --git a/src/share/native/sun/font/layout/SimpleArrayProcessor.cpp b/src/share/native/sun/font/layout/SimpleArrayProcessor.cpp index 1aa71b002b6bb1cb2535d6308043ea02e87796b2..749daa082b6269a84eeef53bfde165b5ac3a3d15 100644 --- a/src/share/native/sun/font/layout/SimpleArrayProcessor.cpp +++ b/src/share/native/sun/font/layout/SimpleArrayProcessor.cpp @@ -59,6 +59,8 @@ SimpleArrayProcessor::~SimpleArrayProcessor() void SimpleArrayProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { + if (LE_FAILURE(success)) return; + le_int32 glyphCount = glyphStorage.getGlyphCount(); le_int32 glyph; diff --git a/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp b/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp index fd912b4481bf38ed8cd634fd839147dea811845d..4d32e3a4c880695752296861be048fc43d2ffe86 100644 --- a/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp +++ b/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp @@ -42,6 +42,10 @@ U_NAMESPACE_BEGIN le_uint32 SinglePositioningSubtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { + if (LE_FAILURE(success)) { + return 0; + } + switch(SWAPW(subtableFormat)) { case 0: @@ -68,6 +72,10 @@ le_uint32 SinglePositioningSubtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { + if (LE_FAILURE(success)) { + return 0; + } + LEGlyphID glyph = glyphIterator->getCurrGlyphID(); le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); if (LE_FAILURE(success)) { @@ -85,6 +93,10 @@ le_uint32 SinglePositioningFormat1Subtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { + if (LE_FAILURE(success)) { + return 0; + } + LEGlyphID glyph = glyphIterator->getCurrGlyphID(); le_int16 coverageIndex = (le_int16) getGlyphCoverage(base, glyph, success); if (LE_FAILURE(success)) { diff --git a/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp b/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp index ccbc0523d3b10f670467bf31f476e9b4a34591e9..81f7a28a1e25b8431da937765d615a0102542678 100644 --- a/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp +++ b/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp @@ -41,6 +41,10 @@ U_NAMESPACE_BEGIN le_uint32 SingleSubstitutionSubtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const { + if (LE_FAILURE(success)) { + return 0; + } + switch(SWAPW(subtableFormat)) { case 0: @@ -67,6 +71,10 @@ le_uint32 SingleSubstitutionSubtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const { + if (LE_FAILURE(success)) { + return 0; + } + LEGlyphID glyph = glyphIterator->getCurrGlyphID(); le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); if (LE_FAILURE(success)) { @@ -88,6 +96,10 @@ le_uint32 SingleSubstitutionFormat1Subtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const { + if (LE_FAILURE(success)) { + return 0; + } + LEGlyphID glyph = glyphIterator->getCurrGlyphID(); le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); if (LE_FAILURE(success)) { diff --git a/src/share/native/sun/font/layout/SingleTableProcessor.cpp b/src/share/native/sun/font/layout/SingleTableProcessor.cpp index e7c7c868bebc5d57ab1a97afab3aa9f20d7e6a99..b613c5a667afc251096e0ea1bf116346c3302ccf 100644 --- a/src/share/native/sun/font/layout/SingleTableProcessor.cpp +++ b/src/share/native/sun/font/layout/SingleTableProcessor.cpp @@ -59,6 +59,8 @@ SingleTableProcessor::~SingleTableProcessor() void SingleTableProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { + if (LE_FAILURE(success)) return; + const LookupSingle *entries = singleTableLookupTable->entries; le_int32 glyph; le_int32 glyphCount = glyphStorage.getGlyphCount();