diff --git a/ChangeLog b/ChangeLog index 8b6f498..4b2b6d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -332,6 +332,13 @@ Version 1.8.0 Version 1.6.18 ******************************************************************************* +2012-04-20 Yoichi NAKAYAMA + + Avoid dereference of null pointer in ixmlNode_setNodeProperties. + + The problem can occur if one of the arguments is NULL. + Test argument and fix assertion. + 2012-04-17 Yoichi NAKAYAMA Create intermediate directory per project on vc9. diff --git a/ixml/src/node.c b/ixml/src/node.c index c20b841..1d1ec16 100644 --- a/ixml/src/node.c +++ b/ixml/src/node.c @@ -1339,7 +1339,10 @@ int ixmlNode_setNodeProperties( { int rc; - assert(destNode != NULL || src != NULL); + assert(destNode != NULL && src != NULL); + if(destNode == NULL || src == NULL) { + return IXML_INVALID_PARAMETER; + } rc = ixmlNode_setNodeValue(destNode, src->nodeValue); if(rc != IXML_SUCCESS) {