Re: [xml] Patch for xmlAddChild



Kris Breuker wrote:
Hello,

The xmlAddChild documentation says: "If there is an attribute with equal name, it is first destroyed." However, when the attribute which is replaced is the only attribute, libxml crashes. I believe this is because the code assumes there are attributes left after the original attribute is destroyed: it reads parent->properties to find the last attribute in the list, but parent->properties is set to NULL when the only property is destroyed by xmlUnlinkNode. I think the attached patch should fix this. Could someone take a look at it?

Thanks,
I have applied this fix.

Rob



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