diff --git a/src/share/native/sun/font/layout/LigatureSubstProc.cpp b/src/share/native/sun/font/layout/LigatureSubstProc.cpp index 0014b95a5151f687e044aa276eb9a96a6e4e1b48..99e9e37dd68e32e8e11e24fd4f51d8efd94644bc 100644 --- a/src/share/native/sun/font/layout/LigatureSubstProc.cpp +++ b/src/share/native/sun/font/layout/LigatureSubstProc.cpp @@ -115,7 +115,7 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp LE_DEBUG_BAD_FONT("off end of ligature substitution header"); return newState; // get out! bad font } - if(componentGlyph > glyphStorage.getGlyphCount()) { + if(componentGlyph >= glyphStorage.getGlyphCount()) { LE_DEBUG_BAD_FONT("preposterous componentGlyph"); currGlyph++; return newState; // get out! bad font diff --git a/src/share/native/sun/font/layout/LigatureSubstProc2.cpp b/src/share/native/sun/font/layout/LigatureSubstProc2.cpp index 8e5b1cfa93d6cf7d4762f82a93cac211476aa08e..558cf8b1ae0eab46e06bd43a83b412b7daa3276b 100644 --- a/src/share/native/sun/font/layout/LigatureSubstProc2.cpp +++ b/src/share/native/sun/font/layout/LigatureSubstProc2.cpp @@ -119,7 +119,7 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp offset = action & lafComponentOffsetMask; if (offset != 0) { - if(componentGlyph > glyphStorage.getGlyphCount()) { + if(componentGlyph >= glyphStorage.getGlyphCount()) { LE_DEBUG_BAD_FONT("preposterous componentGlyph"); currGlyph+= dir; return nextStateIndex; // get out! bad font