aboutsummaryrefslogtreecommitdiffstats
path: root/xpath.c
diff options
context:
space:
mode:
authorAleksey Sanin <aleksey@src.gnome.org>2002-05-05 06:59:57 +0000
committerAleksey Sanin <aleksey@src.gnome.org>2002-05-05 06:59:57 +0000
commit29b6f76c5326616aed5dcff9cb55145137863e97 (patch)
treef2883dd266884cee35831009878a804b56647343 /xpath.c
parent4cbe470258d586294877083ca7f5aa95638f9bd5 (diff)
downloadandroid_external_libxml2-29b6f76c5326616aed5dcff9cb55145137863e97.tar.gz
android_external_libxml2-29b6f76c5326616aed5dcff9cb55145137863e97.tar.bz2
android_external_libxml2-29b6f76c5326616aed5dcff9cb55145137863e97.zip
fixed bug #78858
Diffstat (limited to 'xpath.c')
-rw-r--r--xpath.c8
1 files changed, 5 insertions, 3 deletions
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]);
}