]> granicus.if.org Git - icu/commitdiff
ICU-9340 Fix potential out of bound error in ICU4J ISCII converter
authorMichael Ow <mow@svn.icu-project.org>
Tue, 3 Jul 2012 17:51:41 +0000 (17:51 +0000)
committerMichael Ow <mow@svn.icu-project.org>
Tue, 3 Jul 2012 17:51:41 +0000 (17:51 +0000)
X-SVN-Rev: 32022

icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetISCII.java

index e1bd5fdc4e35cae9144732de098327ce1fa77ba7..3397c3905d7754a722c31177783df83734116233 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *******************************************************************************
- * Copyright (C) 2008-2011, International Business Machines Corporation and    *
+ * Copyright (C) 2008-2012, International Business Machines Corporation and    *
  * others. All Rights Reserved.                                                *
  *******************************************************************************
  */
@@ -1177,7 +1177,7 @@ class CharsetISCII extends CharsetICU {
             targetUniChar = toUnicodeTable[sourceChar];
             /* is the code point valid in current script? */
             if (sourceChar > ASCII_END &&
-                    (validityTable[(short)targetUniChar & UConverterConstants.UNSIGNED_BYTE_MASK] & data.currentMaskToUnicode) == 0) {
+                    (validityTable[targetUniChar & 0x7F] & data.currentMaskToUnicode) == 0) {
                 /* Vocallic RR is assigne in ISCII Telugu and Unicode */
                 if (data.currentDeltaToUnicode != (TELUGU_DELTA) || targetUniChar != VOCALLIC_RR) {
                     targetUniChar = UConverterConstants.missingCharMarker;