aboutsummaryrefslogtreecommitdiffstats
path: root/xpath.c
diff options
context:
space:
mode:
authorKasimier T. Buchcik <kbuchcik@src.gnome.org>2006-06-26 14:31:53 +0000
committerKasimier T. Buchcik <kbuchcik@src.gnome.org>2006-06-26 14:31:53 +0000
commit6422d916d929cb8653d950d4b424388a7ea7230d (patch)
tree62456ace6a31169eb30190e3bf1d8dbe6276c869 /xpath.c
parent766ed7e1e5a4361f3b107ba8dc7af3a8960801c9 (diff)
downloadandroid_external_libxml2-6422d916d929cb8653d950d4b424388a7ea7230d.tar.gz
android_external_libxml2-6422d916d929cb8653d950d4b424388a7ea7230d.tar.bz2
android_external_libxml2-6422d916d929cb8653d950d4b424388a7ea7230d.zip
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.
Diffstat (limited to 'xpath.c')
-rw-r--r--xpath.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xpath.c b/xpath.c
index ff2f2da5..ce46c499 100644
--- a/xpath.c
+++ b/xpath.c
@@ -736,6 +736,7 @@ xmlXPathCompExprAdd(xmlXPathCompExprPtr comp, int ch1, int ch2,
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;