Avoid dereference of null pointer in ixmlNode_setNodeProperties.
The problem can occur if one of the arguments is NULL.
Test argument and fix assertion.
(cherry picked from commit 3d7c1dbd59
)
This commit is contained in:
parent
3b2cfdc45d
commit
76e8812acc
@ -332,6 +332,13 @@ Version 1.8.0
|
||||
Version 1.6.18
|
||||
*******************************************************************************
|
||||
|
||||
2012-04-20 Yoichi NAKAYAMA <yoichi.nakayama(at)gmail.com>
|
||||
|
||||
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 <yoichi.nakayama(at)gmail.com>
|
||||
|
||||
Create intermediate directory per project on vc9.
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user