From f3e032f0f5680f9c664b899140f0cbd31cd95c41 Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Wed, 18 Apr 2001 04:08:25 +0000 Subject: [PATCH] Bug #68237 --> fix array bounds read in ::ScanTXT r=benb sr=sspitzer --- netwerk/streamconv/converters/mozTXTToHTMLConv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp index 8e775eec63ef..ba5f0a914002 100644 --- a/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp +++ b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp @@ -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;