Removing access to NULL pointers in node.c and element.c
Check that newNode is not NULL ixmlNode_cloneNodeTree and pass newAttr as the return node in the ixmlElement_setAttributeNodeNS call of ixmlElement_setAttributeNS. (cherry picked from commit 9b616a08df3613bf27473d176b1b72cd671b75a5)
This commit is contained in:
parent
10805cb8cc
commit
63cccfff08
@ -318,6 +318,14 @@ Version 1.8.0
|
||||
Version 1.6.16
|
||||
*******************************************************************************
|
||||
|
||||
2012-03-08 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
||||
|
||||
Removing access to NULL pointers in node.c and element.c
|
||||
|
||||
Check that newNode is not NULL ixmlNode_cloneNodeTree and pass newAttr
|
||||
as the return node in the ixmlElement_setAttributeNodeNS call of
|
||||
ixmlElement_setAttributeNS.
|
||||
|
||||
2012-03-08 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
||||
|
||||
Memory leaks correction in upnpapi.c
|
||||
|
@ -487,7 +487,7 @@ int ixmlElement_setAttributeNS(
|
||||
Parser_freeNodeContent(&newAttrNode);
|
||||
return IXML_INSUFFICIENT_MEMORY;
|
||||
}
|
||||
if (ixmlElement_setAttributeNodeNS(element, newAttr, NULL) != IXML_SUCCESS) {
|
||||
if (ixmlElement_setAttributeNodeNS(element, newAttr, &newAttr) != IXML_SUCCESS) {
|
||||
ixmlAttr_free(newAttr);
|
||||
Parser_freeNodeContent(&newAttrNode);
|
||||
return IXML_FAILED;
|
||||
|
@ -1040,6 +1040,7 @@ static IXML_Node *ixmlNode_cloneNodeTree(
|
||||
}
|
||||
|
||||
/* by spec, the duplicate node has no parent */
|
||||
if (newNode != NULL)
|
||||
newNode->parentNode = NULL;
|
||||
|
||||
return newNode;
|
||||
|
Loading…
x
Reference in New Issue
Block a user