Re: [xml] patch: namespace corruption in xmlParseBalancedChunkMemoryRecover

On Mon, Sep 11, 2006 at 03:29:23PM -0400, Rob Richards wrote:
Can someone commit this patch for me? I am away and can't commit to CVS 
right now.

  Well I'm on the road too, the first one back commits it :-)

Patch fixes tree corruption when a doc is passed to 
xmlParseBalancedChunkMemoryRecover and something using the XML namespace 
is parsed from the chunk. This patch makes sure that the XML namespapce 
has already been created on the origional document and sets oldNS from 
the origional document on newDoc. This way the XML namespace from the 
origional document will be used on the tree being created, so when tree 
is added to origional document and newDoc is destroyed the namespace 
will be valid.
Currently once newDoc is free'd (causing the XML namespace created just 
for that document to be freed), its use in the new tree is now garbage.

rans the tests and they were fine.

  Very few tests actually cover this kind of cut and paste operations,
hopefully you have them better covered within PHP regression suite.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]