changeset 12378:3c8a548c5def

8074335: Substitute for substitution formats Reviewed-by: prr, srl, mschoene
author vadim
date Tue, 07 Apr 2015 13:37:30 +0300
parents 78b4acd93923
children 361582c06bc3
files src/java.desktop/share/native/libfontmanager/layout/SingleSubstitutionSubtables.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/share/native/libfontmanager/layout/SingleSubstitutionSubtables.cpp	Mon Apr 06 15:54:29 2015 -0700
+++ b/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)) {