bug 280387: Fix a potential crash by passing PR_TRUE for the aReverse paramter to nsScanner::SetPosition(). r+sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@168538 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mrbkap%gmail.com
2005-01-31 00:54:53 +00:00
parent 34bc6b4cc2
commit c19cfc9484

View File

@@ -879,7 +879,12 @@ nsresult CTextToken::ConsumeParsedCharacterData(PRUnichar aChar,
*end == '\r' || *end == '\b')) {
aFound = PR_TRUE;
mTextValue.Rebind(theContent.str());
aScanner.SetPosition(currPos);
// Note: This SetPosition() is actually going backwards from the
// scanner's mCurrentPosition (so we pass aReverse == PR_TRUE). This
// is because we call GetChar() above after we get the current
// position.
aScanner.SetPosition(currPos, PR_FALSE, PR_TRUE);
break;
}
}