From 15dd71d4a24a175f61ad380dcde839d43eea4200 Mon Sep 17 00:00:00 2001 From: prr Date: Thu, 15 Jan 2015 09:50:52 -0800 Subject: 8067699: Better glyph storage Reviewed-by: srl, bae, mschoene --- src/share/native/sun/font/layout/LigatureSubstProc.cpp | 2 +- src/share/native/sun/font/layout/LigatureSubstProc2.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/share/native/sun/font/layout/LigatureSubstProc.cpp b/src/share/native/sun/font/layout/LigatureSubstProc.cpp index 0014b95a5..99e9e37dd 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 8e5b1cfa9..558cf8b1a 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 -- cgit v1.2.3