fixing #75619, related to a problem when trying to evaluate condition when
* xpath.c: fixing #75619, related to a problem when trying
to evaluate condition when the current node set resulting
from that sub-step evaluation is empty. Also fixes 2 potential
problem with previous-sibling and next-siblings axis.
Daniel
diff --git a/xpath.c b/xpath.c
index 4f3e11b..484975c 100644
--- a/xpath.c
+++ b/xpath.c
@@ -8406,7 +8406,6 @@
#endif
last = NULL;
next = xmlXPathNextFollowingSibling;
- mergeNodeSet = xmlXPathNodeSetMergeUnique;
break;
case AXIS_NAMESPACE:
#ifdef DEBUG_STEP
@@ -8438,7 +8437,6 @@
#endif
first = NULL;
next = xmlXPathNextPrecedingSibling;
- mergeNodeSet = xmlXPathNodeSetMergeUnique;
break;
case AXIS_SELF:
#ifdef DEBUG_STEP
@@ -8678,7 +8676,7 @@
/*
* If there is some predicate filtering do it now
*/
- if (op->ch2 != -1) {
+ if ((op->ch2 != -1) && (list != NULL) && (list->nodeNr > 0)) {
xmlXPathObjectPtr obj2;
valuePush(ctxt, xmlXPathWrapNodeSet(list));