Closed Bug 181543 Opened 23 years ago Closed 21 years ago

Return code from Peek saved but not checked in nsScanner::ReadUntil

Categories

(Core :: DOM: HTML Parser, defect, P5)

1.0 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla1.4alpha

People

(Reporter: bratell, Assigned: engel)

References

Details

As the summary says, the return code from calling Peek() in nsScanner::ReadUntil is saved into a variable that is never checked. The result should either be completely ignored or checked. PRUnichar theChar; nsresult result=Peek(theChar); // <--- right now, line 1338 while (current != mEndPosition) {
Status: NEW → ASSIGNED
Priority: -- → P5
Target Milestone: --- → mozilla1.4alpha
Version: Trunk → 1.0 Branch
It appears to be checked now. Looks like someone fixed it. nsresult result=Peek(theChar); if (result == kEOF) { return Eof(); }
Wrong function. Look at the third ReadUntil: nsresult nsScanner::ReadUntil(nsAString& aString, PRUnichar aTerminalChar, PRBool addTerminal) This function doesn't have the check.
Depends on: 276149
Assignee: harishd → Hans-A.Engel
Status: ASSIGNED → NEW
This was fixed by the patch in bug 276149.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.