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:
@@ -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
|
||||||
|
5
xpath.c
5
xpath.c
@@ -7433,8 +7433,13 @@ xmlXPathCompile(const xmlChar *str) {
|
|||||||
ctxt = xmlXPathNewParserContext(str, NULL);
|
ctxt = xmlXPathNewParserContext(str, NULL);
|
||||||
xmlXPathCompileExpr(ctxt);
|
xmlXPathCompileExpr(ctxt);
|
||||||
|
|
||||||
|
if (*ctxt->cur != 0) {
|
||||||
|
xmlXPatherror(ctxt, __FILE__, __LINE__, XPATH_EXPR_ERROR);
|
||||||
|
comp = NULL;
|
||||||
|
} else {
|
||||||
comp = ctxt->comp;
|
comp = ctxt->comp;
|
||||||
ctxt->comp = NULL;
|
ctxt->comp = NULL;
|
||||||
|
}
|
||||||
xmlXPathFreeParserContext(ctxt);
|
xmlXPathFreeParserContext(ctxt);
|
||||||
return(comp);
|
return(comp);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user