64576 -- Make sure to update termial string position to avoid infinite looping.

r=heikki
sr=vidur
This commit is contained in:
[email protected] committed 2001-01-12 19:50:25 +00:00
1 parent 3c18effcf9
commit 73cd57744e
2 files changed
+12 -8

No files matched your search

+6 -4
View File
@@ -643,7 +643,11 @@ nsresult CTextToken::ConsumeUntil(PRUnichar aChar,PRBool aIgnoreComments,nsScann
tempOffset.advance(1);
}
else {
break;
// Ran out of data and haven't found the terminal string yet.
// Note: If a bogus terminal string is found it would have
// been stored in theAltTermStrPos; Bug: 64576
theTermStrPos=endPos;
break; // we have reached the end of the document
}
}
@@ -667,9 +671,7 @@ nsresult CTextToken::ConsumeUntil(PRUnichar aChar,PRBool aIgnoreComments,nsScann
// Even though it is bogus, the position of the terminal string
// could be helpful in case we hit the rock bottom.
if (theAltTermStrPos != endPos) {
theAltTermStrPos = theTermStrPos;
}
theAltTermStrPos = theTermStrPos;
// We did not find '-->' so keep searching for terminal string.
theCurrOffset = theTermStrPos;