From fa3f76cc15d427e795a478439b8b2c6841966c8b Mon Sep 17 00:00:00 2001 From: Michael Ow Date: Wed, 13 Jun 2012 21:07:53 +0000 Subject: [PATCH] ICU-9340 Use bit mask instead of cast to avoid buffer overflow X-SVN-Rev: 31948 --- icu4c/source/common/ucnvisci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/icu4c/source/common/ucnvisci.c b/icu4c/source/common/ucnvisci.c index 055a0a497c9..b36894849cf 100644 --- a/icu4c/source/common/ucnvisci.c +++ b/icu4c/source/common/ucnvisci.c @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2000-2011, International Business Machines +* Copyright (C) 2000-2012, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * file name: ucnvisci.c @@ -1140,7 +1140,7 @@ static const uint16_t lookupTable[][2]={ targetUniChar = toUnicodeTable[(sourceChar)] ; \ /* is the code point valid in current script? */ \ if(sourceChar> ASCII_END && \ - (validityTable[(uint8_t)targetUniChar] & data->currentMaskToUnicode)==0){ \ + (validityTable[(targetUniChar & 0x00FF)] & data->currentMaskToUnicode)==0){ \ /* Vocallic RR is assigne in ISCII Telugu and Unicode */ \ if(data->currentDeltaToUnicode!=(TELUGU_DELTA) || \ targetUniChar!=VOCALLIC_RR){ \ -- 2.40.0