ICU-9340 Fix potential out of bound error in ICU4J ISCII converter

X-SVN-Rev: 32022
This commit is contained in:
Michael Ow 2012-07-03 17:51:41 +00:00
parent 04c477d6ff
commit d98bf1b052

View 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;