Bug 122083: Typing "v", "vi", "vie" ... "view-source" into URL bar and pressing enter freezes Mozilla. r=dbradley, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@113414 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1112,10 +1112,14 @@ static inline PRInt32
|
||||
TranslateCompareResult(const PRInt32 aDestLength, const PRInt32& aSourceLength, PRInt32 result, PRInt32 aCount)
|
||||
{
|
||||
|
||||
if (0==result && -1==aCount) {
|
||||
//Since the caller didn't give us a length to test, and minlen characters matched,
|
||||
//we have to assume that the longer string is greater.
|
||||
|
||||
if (0==result && (-1==aCount ||
|
||||
aDestLength < aCount ||
|
||||
aSourceLength < aCount)) {
|
||||
|
||||
//Since the caller didn't give us a length to test, or strings shorter
|
||||
//than aCount, and minlen characters matched, we have to assume that the
|
||||
//longer string is greater.
|
||||
|
||||
if (aDestLength != aSourceLength) {
|
||||
//we think they match, but we've only compared minlen characters.
|
||||
//if the string lengths are different, then they don't really match.
|
||||
|
||||
Reference in New Issue
Block a user