~ubuntu-branches/ubuntu/wily/libxml2/wily

« back to all changes in this revision

Viewing changes to debian/patches/0014-Fix-previous-change-to-node-sort-order.patch

  • Committer: Package Import Robot
  • Author(s): Aron Xu
  • Date: 2015-09-22 16:31:48 UTC
  • mfrom: (43.2.12 sid)
  • Revision ID: package-import@ubuntu.com-20150922163148-di6xmyfvb20jmtq2
Tags: 2.9.2+zdfsg1-4
* Revert everything in N'ACKed NMU revert to 2.9.1.
  - Resolving regression, Closes: #754424
  - Drop the following NMU, not needed in 2.9.2, Closes: #781232
  - Drop not approved patch for GNOME #746048
* Revert icu dbg drop, but don't hardcode version,
  thanks Matthias Klose <doko>, Closes: #798642
* Cherry pick upstream post release patches:
  - Fix for regression triggered by CVE-2014-3660, Closes: #768089
  - Fix for the spurious ID already defined error, Closes: #766884
  - Fix for CVE-2015-1819, Closes: #782782
  - Fix for GNOME #744980, Closes: #783010
  - Several fixes for memory related issues.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: Nick Wellnhofer <wellnhofer@aevum.de>
 
2
Date: Sat, 11 Jul 2015 14:27:34 +0200
 
3
Subject: Fix previous change to node sort order
 
4
 
 
5
Commit ba58f23 broke comparison of nodes from different documents.
 
6
Thanks to Olli Pottonen for the report.
 
7
---
 
8
 xpath.c | 8 ++++----
 
9
 1 file changed, 4 insertions(+), 4 deletions(-)
 
10
 
 
11
diff --git a/xpath.c b/xpath.c
 
12
index 95559b3..e60f4e5 100644
 
13
--- a/xpath.c
 
14
+++ b/xpath.c
 
15
@@ -361,14 +361,14 @@ turtle_comparison:
 
16
     /*
 
17
      * compute depth to root
 
18
      */
 
19
-    for (depth2 = 0, cur = node2; cur != NULL; cur = cur->parent) {
 
20
-       if (cur == node1)
 
21
+    for (depth2 = 0, cur = node2; cur->parent != NULL; cur = cur->parent) {
 
22
+       if (cur->parent == node1)
 
23
            return(1);
 
24
        depth2++;
 
25
     }
 
26
     root = cur;
 
27
-    for (depth1 = 0, cur = node1; cur != NULL; cur = cur->parent) {
 
28
-       if (cur == node2)
 
29
+    for (depth1 = 0, cur = node1; cur->parent != NULL; cur = cur->parent) {
 
30
+       if (cur->parent == node2)
 
31
            return(-1);
 
32
        depth1++;
 
33
     }