Closed Bug 77145 Opened 25 years ago Closed 25 years ago

Stray left angle brackets ("<") from tags are left in output around the 4kB mark

Categories

(Core :: DOM: HTML Parser, defect)

x86
All
defect
Not set
major

Tracking

()

VERIFIED FIXED
mozilla0.9.2

People

(Reporter: danp, Assigned: harishd)

References

()

Details

(Whiteboard: [fix in hand])

Attachments

(4 files)

The gist of this bug is that the parser seems to leave a stray left angle bracket from any HTML tag as long as it is in just the right place, which seems to be around the *4096* byte mark. (I smell an off-by one buffer screwup here.) In the limited time I've had to play with this bug (I found this in the middle of hurriedly writing some release notes in between fixing bugs for a product that's due tomorrow), I've managed to whip up two test cases (located at the URL for this bug), both of which need to be run using the file:// resource type to most easily reproduce this bug, and need to be left in their original format (which is CR/LF line endings). *The exact number of characters matters when reproducing this bug*, as I already mentioned. To ensure the file contents aren't munged when downloading, the two testcases are in a .zip file. To see the bug in action, open each test case, and look for an opening angle bracket at the bottom. Then look at the HTML. It all should become clear then.
Summary: Stray left angle brackets ("<") from tags are left in output when parsing files of certain sizes → Stray left angle brackets ("<") from tags are left in output around the 4kB mark
Some additional info after playing with the cool test case: The requirements for reproducing the bug are: 1) You have to cheat/make Moz into thinking that it is dealing with an HTML file (so Moz will have to parse the content instead of diaplaying it like plain text). 2) File content: a) First, put a bunch of characters exactly 4095 bytes long. b) Then, add a retuen (which, in DOS file format, means an CR and LF) c) Finally, put some other characters (length doesn't matter)
Oh... the 2nd attachment is a ZIP file too...
I see this on Linux build 2001-04-22-21 as well. status to new, adding various keywords.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.2
Setting to 1.0 since 0.9.2 hasn't been scheduled yet.
Target Milestone: mozilla0.9.2 → mozilla1.0
Moving to milestone 0.9.2 We'd really like this fix before too long nsbeta1-, we don't need it immediately, other things are more important right now.
Keywords: nsbeta1nsbeta1-
Target Milestone: mozilla1.0 → mozilla0.9.2
Symptoms are very similar to bug 63081.
Attached patch Patch v1.1Splinter Review
Whiteboard: [fix in hand]
r/sr=vidur
a= asa@mozilla.org for checkin to the trunk. (on behalf of drivers)
Blocks: 83989
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fix is in.
Status: RESOLVED → VERIFIED
Verified on build: 2001-06-20-04-Trunk platform: Win NT Both the test cases load fine.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: