[libxml2] Fix null deref in previous commit



commit 949eced484520bdde3348e55eba048501b809127
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Mon Apr 22 16:04:26 2019 +0200

    Fix null deref in previous commit

 xpath.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/xpath.c b/xpath.c
index aa10fbfd..d15fd8bb 100644
--- a/xpath.c
+++ b/xpath.c
@@ -13305,7 +13305,9 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
 
                 CHECK_TYPE0(XPATH_NODESET);
                 set = ctxt->value->nodesetval;
-                xmlXPathNodeSetFilter(ctxt, set, op->ch2, 1, set->nodeNr, 1);
+                if (set != NULL)
+                    xmlXPathNodeSetFilter(ctxt, set, op->ch2,
+                                          1, set->nodeNr, 1);
                 break;
             }
         case XPATH_OP_SORT:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]