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.
This commit is contained in:
parent
3ab8d536a0
commit
9b616a08df
@ -2,6 +2,14 @@
|
|||||||
Version 1.6.16
|
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>
|
2012-03-08 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
||||||
|
|
||||||
Memory leaks correction in upnpapi.c
|
Memory leaks correction in upnpapi.c
|
||||||
|
@ -487,7 +487,7 @@ int ixmlElement_setAttributeNS(
|
|||||||
Parser_freeNodeContent(&newAttrNode);
|
Parser_freeNodeContent(&newAttrNode);
|
||||||
return IXML_INSUFFICIENT_MEMORY;
|
return IXML_INSUFFICIENT_MEMORY;
|
||||||
}
|
}
|
||||||
if (ixmlElement_setAttributeNodeNS(element, newAttr, NULL) != IXML_SUCCESS) {
|
if (ixmlElement_setAttributeNodeNS(element, newAttr, &newAttr) != IXML_SUCCESS) {
|
||||||
ixmlAttr_free(newAttr);
|
ixmlAttr_free(newAttr);
|
||||||
Parser_freeNodeContent(&newAttrNode);
|
Parser_freeNodeContent(&newAttrNode);
|
||||||
return IXML_FAILED;
|
return IXML_FAILED;
|
||||||
|
@ -1040,7 +1040,8 @@ static IXML_Node *ixmlNode_cloneNodeTree(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* by spec, the duplicate node has no parent */
|
/* by spec, the duplicate node has no parent */
|
||||||
newNode->parentNode = NULL;
|
if (newNode != NULL)
|
||||||
|
newNode->parentNode = NULL;
|
||||||
|
|
||||||
return newNode;
|
return newNode;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user