fix bug 17103. fix array boundary access problem when get character class array . r=cata a=choffmannnsCyrillic*.cpp

git-svn-id: svn://10.0.0.236/trunk@56376 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ftang%netscape.com 1999-12-22 07:47:01 +00:00
parent e751fa7279
commit 6c716e39db

View File

@ -107,7 +107,11 @@ void nsCyrillicDetector::HandleData(const char* aBuf, PRUint32 aLen)
{
for(PRUint8 j=0;j<mItems;j++)
{
cls = mCyrillicClass[j][*b];
if( 0x80 & *b)
cls = mCyrillicClass[j][(*b) & 0x7F];
else
cls = 0;
NS_ASSERTION( cls <= 32 , "illegal character class");
mProb[j] += gCyrillicProb[mLastCls[j]][cls];
mLastCls[j] = cls;
}