diff options
author | Aron Xu <aron@debian.org> | 2015-09-22 16:23:21 +0800 |
---|---|---|
committer | Aron Xu <aron@debian.org> | 2015-09-22 16:23:21 +0800 |
commit | fccd80a7d35b9eefabcc384d5c9fe89d9545dd22 (patch) | |
tree | ca656201cfb4fdfff588be659e83e25bd9b060ce /debian/patches/0014-Fix-previous-change-to-node-sort-order.patch | |
parent | 08766acaa78dcf7b2174cca94d5e102f910df6dd (diff) | |
download | libxml2-fccd80a7d35b9eefabcc384d5c9fe89d9545dd22.tar.gz |
Upstream post release cherry-picks
Diffstat (limited to 'debian/patches/0014-Fix-previous-change-to-node-sort-order.patch')
-rw-r--r-- | debian/patches/0014-Fix-previous-change-to-node-sort-order.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/debian/patches/0014-Fix-previous-change-to-node-sort-order.patch b/debian/patches/0014-Fix-previous-change-to-node-sort-order.patch new file mode 100644 index 0000000..4ff344b --- /dev/null +++ b/debian/patches/0014-Fix-previous-change-to-node-sort-order.patch @@ -0,0 +1,33 @@ +From: Nick Wellnhofer <wellnhofer@aevum.de> +Date: Sat, 11 Jul 2015 14:27:34 +0200 +Subject: Fix previous change to node sort order + +Commit ba58f23 broke comparison of nodes from different documents. +Thanks to Olli Pottonen for the report. +--- + xpath.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/xpath.c b/xpath.c +index 95559b3..e60f4e5 100644 +--- a/xpath.c ++++ b/xpath.c +@@ -361,14 +361,14 @@ turtle_comparison: + /* + * compute depth to root + */ +- for (depth2 = 0, cur = node2; cur != NULL; cur = cur->parent) { +- if (cur == node1) ++ for (depth2 = 0, cur = node2; cur->parent != NULL; cur = cur->parent) { ++ if (cur->parent == node1) + return(1); + depth2++; + } + root = cur; +- for (depth1 = 0, cur = node1; cur != NULL; cur = cur->parent) { +- if (cur == node2) ++ for (depth1 = 0, cur = node1; cur->parent != NULL; cur = cur->parent) { ++ if (cur->parent == node2) + return(-1); + depth1++; + } |