- xpath.c: fixed xmlXPathCompile to detected unproperly ended expr
Daniel
diff --git a/xpath.c b/xpath.c
index f170917..c887e56 100644
--- a/xpath.c
+++ b/xpath.c
@@ -7433,8 +7433,13 @@
     ctxt = xmlXPathNewParserContext(str, NULL);
     xmlXPathCompileExpr(ctxt);
 
-    comp = ctxt->comp;
-    ctxt->comp = NULL;
+    if (*ctxt->cur != 0) {
+	xmlXPatherror(ctxt, __FILE__, __LINE__, XPATH_EXPR_ERROR);
+	comp = NULL;
+    } else {
+	comp = ctxt->comp;
+	ctxt->comp = NULL;
+    }
     xmlXPathFreeParserContext(ctxt);
     return(comp);
 }