1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-21 18:03:38 +03:00

B #4503: checking nodestval before dereferencing

Signed-off-by: Abdullahaml1 <abdullah_aml@protonmail.com>
This commit is contained in:
Abdullah Aml 2020-04-16 15:48:41 +02:00 committed by GitHub
parent 7fafd51a64
commit d3443f5e77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -79,6 +79,11 @@ public:
break;
case XPATH_NODESET:
if (obj->nodesetval == 0)
{
return;
}
for (int i = 0; i < obj->nodesetval->nodeNr ; ++i)
{
cur = obj->nodesetval->nodeTab[i];

View File

@ -116,6 +116,11 @@ void ObjectXML::xpaths(std::vector<std::string>& content, const char * expr)
break;
case XPATH_NODESET:
if (obj->nodesetval == 0)
{
return;
}
for(int i = 0; i < obj->nodesetval->nodeNr ; ++i)
{
cur = obj->nodesetval->nodeTab[i];