Closed
Bug 501725
Opened 15 years ago
Closed 15 years ago
HTML5 parser uses nsDependentString() on strings that are not null terminated.
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jst, Unassigned)
Details
Attachments
(1 file)
553 bytes,
patch
|
mrbkap
:
review+
mrbkap
:
superreview+
|
Details | Diff | Splinter Review |
I see a ton of these whenever I'm loading pages with the HTML5 parser enabled. ###!!! ASSERTION: nsTDependentString must wrap only null-terminated strings: 'mData[mLength] == 0', file ../../dist/include/nsTDependentString.h, line 67 Patch coming up.
Attachment #386303 -
Flags: superreview?(mrbkap)
Attachment #386303 -
Flags: review?(mrbkap)
Updated•15 years ago
|
Attachment #386303 -
Flags: superreview?(mrbkap)
Attachment #386303 -
Flags: superreview+
Attachment #386303 -
Flags: review?(mrbkap)
Attachment #386303 -
Flags: review+
Comment 1•15 years ago
|
||
Comment on attachment 386303 [details] [diff] [review] Use nsDependentSubstring() instead. >+ return local->Equals(nsDependentSubstring(buf + offset, buf + offset + length)); Isn't Substring preferred over explict uses of nsDependentSubstring?
Reporter | ||
Comment 2•15 years ago
|
||
Fixed. http://hg.mozilla.org/mozilla-central/rev/bd42b12e6d2e
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 3•15 years ago
|
||
(In reply to comment #1) > (From update of attachment 386303 [details] [diff] [review]) > >+ return local->Equals(nsDependentSubstring(buf + offset, buf + offset + length)); > Isn't Substring preferred over explict uses of nsDependentSubstring? Duh, totally overlooked this comment here. And I don't know if Substring is preferred here, if it is I'm happy to change it, but this file uses nsDependentSubstring() elsewhere too.
You need to log in
before you can comment on or make changes to this bug.
Description
•