Closed Bug 280387 Opened 20 years ago Closed 20 years ago

Another bad use of nsScanner::SetPosition

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: mrbkap, Assigned: mrbkap)

Details

(Keywords: crash)

Attachments

(1 file)

Although it is extremely unlikely that this will happen, there is a possibility that the SetPosition call on line 882 of nsHTMLTokens.cpp could crash or otherwise put the scanner in an invalid state. I found this after adding the sanity checking mentioned in bug 280386.
Attached patch patch v1Splinter Review
The fix is pretty well explained in the added comment and this is pretty simple, so looking for r+sr=.
Attachment #172851 - Flags: superreview?(bzbarsky)
Attachment #172851 - Flags: review?(bzbarsky)
Comment on attachment 172851 [details] [diff] [review] patch v1 r+sr=bzbarsky
Attachment #172851 - Flags: superreview?(bzbarsky)
Attachment #172851 - Flags: superreview+
Attachment #172851 - Flags: review?(bzbarsky)
Attachment #172851 - Flags: review+
Fix checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Severity: normal → critical
Keywords: crash
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: