Fixed an bug in xmlXPathCompExprAdd(): the newly introduced field
* xpath.c: Fixed an bug in xmlXPathCompExprAdd(): the newly
introduced field @rewriteType on xmlXPathStepOp was not
initialized to zero here; this could lead to the activation
of the axis rewrite code in xmlXPathNodeCollectAndTest() when
@rewriteType is randomly set to the value 1. A test
(hardcoding the intial value to 1) revealed that the
resulting incorrect behaviour is similar to the behaviour
as described by Arnold Hendriks on the mailing list; so I
hope that will fix the issue.
diff --git a/ChangeLog b/ChangeLog
index 41f0816..306461a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Mon Jun 26 16:22:50 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Fixed an bug in xmlXPathCompExprAdd(): the newly
+ introduced field @rewriteType on xmlXPathStepOp was not
+ initialized to zero here; this could lead to the activation
+ of the axis rewrite code in xmlXPathNodeCollectAndTest() when
+ @rewriteType is randomly set to the value 1. A test
+ (hardcoding the intial value to 1) revealed that the
+ resulting incorrect behaviour is similar to the behaviour
+ as described by Arnold Hendriks on the mailing list; so I
+ hope that will fix the issue.
+
Fri Jun 23 18:26:08 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
* xpath.c: Fixed an error in xmlXPathEvalExpr(), which
diff --git a/xpath.c b/xpath.c
index ff2f2da..ce46c49 100644
--- a/xpath.c
+++ b/xpath.c
@@ -736,6 +736,7 @@
comp->steps = real;
}
comp->last = comp->nbStep;
+ comp->steps[comp->nbStep].rewriteType = 0;
comp->steps[comp->nbStep].ch1 = ch1;
comp->steps[comp->nbStep].ch2 = ch2;
comp->steps[comp->nbStep].op = op;