ICU-9340 Use bit mask instead of cast to avoid buffer overflow

X-SVN-Rev: 31948
This commit is contained in:
Michael Ow 2012-06-13 21:07:53 +00:00
parent c1dc277c46
commit fa3f76cc15

View file

@ -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){ \