Closed Bug 64752 Opened 24 years ago Closed 24 years ago

Crash with DOMParser.parseFromString() with empty string

Categories

(Core :: XML, defect, P2)

x86
Windows 2000
defect

Tracking

()

VERIFIED WORKSFORME
mozilla0.9

People

(Reporter: guninski, Assigned: hjtoi-bugzilla)

Details

(Keywords: crash)

Attachments

(2 files)

The following crashes Mozilla: ---------------------------------------------------------- <HTML> Written by <A HREF="http://www.guninski.com">Georgi Guninski</A> <BR> <SCRIPT> a=new DOMParser(); b=a.parseFromString("","text/xml"); </SCRIPT> </HTML> ----------------------------------------------------------
->DOM
Assignee: mstoltz → jst
Status: UNCONFIRMED → NEW
Component: Security: General → DOM Level 0
Ever confirmed: true
QA Contact: ckritzer → desale
I believe Heikki is working in this area now so I'm reassigning to him.
Assignee: jst → heikki
Severity: normal → critical
Keywords: crash, nsbeta1
Right. DOMParser is part of the XMLExtras component. This should be trivial to fix.
Status: NEW → ASSIGNED
Component: DOM Level 0 → XML
Summary: Crash with DOMParser() → Crash with DOMParser.parseFromString() with empty string
Target Milestone: --- → mozilla0.9
Weird.. but this one is not crashing for me either with today's build on NT (plus some of my changes). I can see that there is something wrong in erroneous cases (we are not setting the return value to nul), but giving an empty string to parse does not seem cause a crash on me. I'll attach a fix for those, but could somebody please test this on a recent build to see if this still occurs?
Priority: -- → P2
Oh, I think I know what caused this, Rick Gessners checkins to the parser a few days ago had an boog in it, he made some changes to the XML error reporter that caused a crash if it was ever called (wrong format string to printf, %s in stead of %d), I checked in a fix yesterday morning so it doesn't crash there any more. I happen to have a build with that bad code still and I do crash when loading that testcase. I believe this is FIXED, feel free to leave this open if you wanna roll in the changes you have on this bug...
r=jst
sr=vidur for the cleanup.
I checked in the fix, but as Johnny said this was probably the bug introduced by rickg and fixed by Johnny. Marking wfm.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
Verified with 2001-020608.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: