1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-08-07 06:43:02 +03:00

- xpath.c: fixed xmlXPathCompile to detected unproperly ended expr

Daniel
This commit is contained in:
Daniel Veillard
2001-04-22 08:50:55 +00:00
parent 70a9da54eb
commit 40af649f9b
2 changed files with 11 additions and 2 deletions

View File

@@ -1,3 +1,7 @@
Sun Apr 22 10:49:23 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* xpath.c: fixed xmlXPathCompile to detected unproperly ended expr
Sat Apr 21 18:27:51 CEST 2001 Bjorn Reese <breese@users.sourceforge.net> Sat Apr 21 18:27:51 CEST 2001 Bjorn Reese <breese@users.sourceforge.net>
* libxml.h: new header used only for the compilation of libxml * libxml.h: new header used only for the compilation of libxml

View File

@@ -7433,8 +7433,13 @@ xmlXPathCompile(const xmlChar *str) {
ctxt = xmlXPathNewParserContext(str, NULL); ctxt = xmlXPathNewParserContext(str, NULL);
xmlXPathCompileExpr(ctxt); xmlXPathCompileExpr(ctxt);
comp = ctxt->comp; if (*ctxt->cur != 0) {
ctxt->comp = NULL; xmlXPatherror(ctxt, __FILE__, __LINE__, XPATH_EXPR_ERROR);
comp = NULL;
} else {
comp = ctxt->comp;
ctxt->comp = NULL;
}
xmlXPathFreeParserContext(ctxt); xmlXPathFreeParserContext(ctxt);
return(comp); return(comp);
} }