1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-10 08:58:16 +03:00

fixed problem concerning XPath context corruption during function argument

* xpath.c: fixed problem concerning XPath context corruption
  during function argument evaluation (bug 157652)
This commit is contained in:
William M. Brack 2004-11-09 12:20:42 +00:00
parent f2a36f98e1
commit 645a924a9d
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Tue Nov 9 10:21:37 GMT 2004 William Brack <wbrack@mmm.com.hk>
* xpath.c: fixed problem concerning XPath context corruption
during function argument evaluation (bug 157652)
Mon Nov 8 18:54:52 CET 2004 Daniel Veillard <daniel@veillard.com>
* testapi.c: more types.

View File

@ -10437,10 +10437,14 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
case XPATH_OP_ARG:
bakd = ctxt->context->doc;
bak = ctxt->context->node;
pp = ctxt->context->proximityPosition;
cs = ctxt->context->contextSize;
if (op->ch1 != -1)
total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
ctxt->context->doc = bakd;
ctxt->context->contextSize = cs;
ctxt->context->proximityPosition = pp;
ctxt->context->node = bak;
ctxt->context->doc = bakd;
CHECK_ERROR0;
if (op->ch2 != -1) {
total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);