changeset 431:357bb3ba18c4

6963285: Crash in ICU Opentype layout engine due to mismatch in character counts Reviewed-by: bae, igor
author prr
date Thu, 24 Jun 2010 11:23:31 -0700
parents d77434402021
children 28503855a149
files src/share/native/sun/font/layout/LayoutEngine.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/font/layout/LayoutEngine.cpp	Wed Jun 23 13:50:19 2010 +0400
+++ b/src/share/native/sun/font/layout/LayoutEngine.cpp	Thu Jun 24 11:23:31 2010 -0700
@@ -292,7 +292,7 @@
         outCharCount = canonGSUBTable->process(glyphStorage, rightToLeft, scriptTag,
             langSysTag, NULL, substitutionFilter, canonFeatureMap, canonFeatureMapCount, FALSE);
 
-        out = (rightToLeft? count - 1 : 0);
+        out = (rightToLeft? outCharCount - 1 : 0);
 
         outChars = LE_NEW_ARRAY(LEUnicode, outCharCount);
         for (i = 0; i < outCharCount; i += 1, out += dir) {