aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--xpath.c8
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 484d999f..11f291b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+Sat 04 May 2002 11:56:31 PM PDT Aleksey Sanin <aleksey@aleksey.com>
+ * xpath.c: fixed bug #78858
+
Sun May 5 08:57:08 CEST 2002 Daniel Veillard <daniel@veillard.com>
* tree.c: modified xmlNodeSetBase to allow changing the
diff --git a/xpath.c b/xpath.c
index b56c462f..8262e1d9 100644
--- a/xpath.c
+++ b/xpath.c
@@ -10220,15 +10220,17 @@ xmlXPathRunEval(xmlXPathParserContextPtr ctxt) {
xmlMalloc(10 * sizeof(xmlXPathObjectPtr));
if (ctxt->valueTab == NULL) {
xmlFree(ctxt);
- xmlGenericError(xmlGenericErrorContext,
- "xmlXPathRunEval: out of memory\n");
- return;
}
ctxt->valueNr = 0;
ctxt->valueMax = 10;
ctxt->value = NULL;
}
comp = ctxt->comp;
+ if(comp->last < 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPathRunEval: last is less than zero\n");
+ return;
+ }
xmlXPathCompOpEval(ctxt, &comp->steps[comp->last]);
}