Bug #68237 --> fix array bounds read in ::ScanTXT

r=benb
sr=sspitzer
This commit is contained in:
mscott%netscape.com 2001-04-18 04:08:25 +00:00
Родитель 94b6354336
Коммит f3e032f0f5
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -978,7 +978,7 @@ mozTXTToHTMLConv::ScanTXT(const PRUnichar * aInString, PRInt32 aInStringLength,
case ':':
case '@':
case '.':
if (aInString[i - 1] != ' ' && aInString[i + 1] != ' ') // Performance increase
if ( (i == 0 || ((i > 0) && aInString[i - 1] != ' ')) && aInString[i +1] != ' ') // Performance increase
{
PRInt32 replaceBefore;
PRInt32 replaceAfter;