summaryrefslogtreecommitdiff
path: root/xpath.c
diff options
context:
space:
mode:
authorWilliam M. Brack <wbrack@src.gnome.org>2004-11-09 12:20:42 +0000
committerWilliam M. Brack <wbrack@src.gnome.org>2004-11-09 12:20:42 +0000
commit645a924a9d50d8e0eced5dd7277214a65756c2e1 (patch)
treee4950cedcbe67cadc99534d650b7244853881a87 /xpath.c
parentf2a36f98e16efa8a89d9bed359d59be10e5d33cd (diff)
downloadlibxml2-645a924a9d50d8e0eced5dd7277214a65756c2e1.tar.gz
fixed problem concerning XPath context corruption during function argument
* xpath.c: fixed problem concerning XPath context corruption during function argument evaluation (bug 157652)
Diffstat (limited to 'xpath.c')
-rw-r--r--xpath.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xpath.c b/xpath.c
index 9683832c..fad8c26c 100644
--- a/xpath.c
+++ b/xpath.c
@@ -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]);