Closed
Bug 1176668
Opened 10 years ago
Closed 9 years ago
Code from handling NCR overflow is bogus, especially upon EOF
Categories
(Core :: DOM: HTML Parser, defect)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: hsivonen, Assigned: hsivonen)
References
()
Details
Attachments
(2 files, 2 obsolete files)
7.38 KB,
patch
|
hsivonen
:
review+
|
Details | Diff | Splinter Review |
13.94 KB,
patch
|
hsivonen
:
review+
|
Details | Diff | Splinter Review |
Steps to reproduce:
1) http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3540
Actual results:
Not U+FFFD.
Expected result:
U+FFFD.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8625262 -
Flags: review?(wchen)
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8625263 -
Flags: review?(wchen)
Assignee | ||
Comment 3•10 years ago
|
||
See bug 1029671 comment 36 for the big picture of the whole queue and about landing.
Comment 4•10 years ago
|
||
Comment on attachment 8625262 [details] [diff] [review]
htmlparser repo patch
Review of attachment 8625262 [details] [diff] [review]:
-----------------------------------------------------------------
We should also add an assertion to handleNcrValue to make sure that value is non-negative.
::: src/nu/validator/htmlparser/impl/Tokenizer.java
@@ +3352,5 @@
> seenDigits = true;
> + // Avoid overflow
> + if (value <= 0x10FFFF) {
> + value *= 16;
> + value += c - '0';
trailing whitespace
Attachment #8625262 -
Flags: review?(wchen) → review+
Updated•10 years ago
|
Attachment #8625263 -
Flags: review?(wchen) → review+
Assignee | ||
Comment 5•10 years ago
|
||
Thanks. Attaching the fix patch for the record.
Attachment #8625262 -
Attachment is obsolete: true
Attachment #8644264 -
Flags: review+
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8625263 -
Attachment is obsolete: true
Attachment #8644265 -
Flags: review+
Comment 8•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•