--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/SingleSubstitutionSubtables.cpp Mon Apr 06 15:54:29 2015 -0700
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/SingleSubstitutionSubtables.cpp Tue Apr 07 13:37:30 2015 +0300
@@ -94,7 +94,9 @@
return 0;
}
- if (coverageIndex >= 0) {
+ LEReferenceToArrayOf<TTGlyphID> substituteArrayRef(base, success, substituteArray, SWAPW(glyphCount));
+
+ if (coverageIndex >= 0 && LE_SUCCESS(success) && coverageIndex < substituteArrayRef.getCount()) {
TTGlyphID substitute = SWAPW(substituteArray[coverageIndex]);
if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute), success)) {