From: Michael Ow Date: Tue, 3 Jul 2012 17:51:41 +0000 (+0000) Subject: ICU-9340 Fix potential out of bound error in ICU4J ISCII converter X-Git-Tag: milestone-59-0-1~3730 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d98bf1b052ecb0bef989a21825a3b78c9945b45d;p=icu ICU-9340 Fix potential out of bound error in ICU4J ISCII converter X-SVN-Rev: 32022 --- diff --git a/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetISCII.java b/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetISCII.java index e1bd5fdc4e3..3397c3905d7 100644 --- a/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetISCII.java +++ b/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetISCII.java @@ -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;