< prev index next >

src/java.desktop/share/native/libfontmanager/layout/LigatureSubstProc2.cpp

Print this page
rev 15133 : 8161923: Fix two memory issues.
Reviewed-by: vadim

*** 147,161 **** if (LE_FAILURE(success)) { currGlyph+= dir; return nextStateIndex; } glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], ligatureGlyph); ! if(mm==nComponents) { LE_DEBUG_BAD_FONT("exceeded nComponents"); mm--; // don't overrun the stack. } ! stack[++mm] = componentGlyph; i = 0; } else { glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], 0xFFFF); } } --- 147,162 ---- if (LE_FAILURE(success)) { currGlyph+= dir; return nextStateIndex; } glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], ligatureGlyph); ! ++mm; ! if (mm == nComponents) { LE_DEBUG_BAD_FONT("exceeded nComponents"); mm--; // don't overrun the stack. } ! stack[mm] = componentGlyph; i = 0; } else { glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], 0xFFFF); } }
< prev index next >