Closed Bug 598683 Opened 14 years ago Closed 13 years ago

Bad XML with unterminated node with namespace not throwing correctly

Categories

(Tamarin Graveyard :: Virtual Machine, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wsharp, Assigned: stejohns)

Details

Attachments

(2 files)

var xml:XML=new XML("<a><b:c xmlns:b=\"abc\"></d:c></a>") ;
trace(xml);

February 2009 merge into player code injected this bug.  The XMLObject closing tag handling has been broken with nodes with namespaces.  The code is currently:

                        if (!NodeNameEquals(tag.text, nodeNameStart, parentName, ns) &&
                            // We're trying to support paired nodes where the first node gets a namespace
                            // from the default namespace.
                            parentName->Compare(*tag.text, nodeNameStart, tag.text->length()-nodeNameStart) != 0 &&
                            ns->getURI() == toplevel->getDefaultNamespace()->getURI())
                        {

...and should be...

                        if (!NodeNameEquals(tag.text, nodeNameStart, parentName, ns) &&
                            // We're trying to support paired nodes where the first node gets a namespace
                            // from the default namespace.
                            !(parentName->Compare(*tag.text, nodeNameStart, tag.text->length()-nodeNameStart) == 0 &&
                            ns->getURI() == toplevel->getDefaultNamespace()->getURI()))

Prior to string changes, etc., it was...

						if ((!NodeNameEquals (thisNodeNameNoSlash, noSlashLen, parentName, ns)) &&
							// We're trying to support paired nodes where the first node gets a namespace
							// from the default namespace.
							(!(m.getName()->Equals (thisNodeNameNoSlash, noSlashLen) && (ns->getURI() == ns2->getURI()))))
						{
Attachment #477559 - Flags: superreview?(lhansen)
Attachment #477559 - Flags: review?(stejohns)
Attachment #477559 - Attachment is patch: true
Attachment #477559 - Flags: review?(stejohns) → review+
Attachment #477559 - Flags: superreview?(lhansen) → superreview+
Assignee: nobody → wsharp
http://hg.mozilla.org/tamarin-redux/rev/de2041ef45dd
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Reopening -- it turns out that existing content depends on this bug (!) so we need to version this fix for SWF12-or-later.
Status: RESOLVED → UNCONFIRMED
Ever confirmed: false
Resolution: FIXED → ---
Attached patch PatchSplinter Review
Note that the patch makes the fix conditional on SWF11 (not SWF12 as the previous comment indicated)
Assignee: wsharp → stejohns
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #509551 - Flags: superreview?(lhansen)
Attachment #509551 - Flags: review?(wsharp)
(I just noticed there are some naked tabs in the patch; you can assume those will be cleansed)
Comment on attachment 509551 [details] [diff] [review]
Patch

Fine from an SR point of view; deferring to Werner on functionality.
Attachment #509551 - Flags: superreview?(lhansen) → superreview+
Attachment #509551 - Flags: review?(wsharp) → review+
new patch pushed to TR 5893:40d8d58360c7
Status: ASSIGNED → RESOLVED
Closed: 14 years ago13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: