~ubuntu-branches/ubuntu/utopic/libxml2/utopic

« back to all changes in this revision

Viewing changes to debian/patches/0007-Fix-XPath-optimization-with-predicates.patch

  • Committer: Package Import Robot
  • Author(s): Aron Xu, Christian Svensson, Daniel Schepler, Helmut Grohne, Adam Conrad, Matthias Klose, Aron Xu
  • Date: 2014-07-09 05:40:15 UTC
  • mto: This revision was merged to the branch mainline in revision 75.
  • Revision ID: package-import@ubuntu.com-20140709054015-rdnfjxrf3zvmw6l7
[ Christian Svensson ]
* Do not build-depend on readline (Closes: #742350)

[ Daniel Schepler ]
* Patch to bootstrap without python (Closes: #738080)

[ Helmut Grohne ]
* Drop unneeded B-D on perl and binutils (Closes: #753005)

[ Adam Conrad ]
* Actually run dh_autoreconf, which the old/new mixed rules file misses.

[ Matthias Klose ]
* Add patch to fix python multiarch issue
* Allow the package to cross-build by tweaking B-Ds on python
* Set PYTHON_LIBS for cross builds

[ Aron Xu ]
* Use correct $CC
* Configure udeb without python
* New round of cherry-picking upstream fixes
  - Includes fixes for CVE-2014-0191 (Closes: #747309).
* Call prename with -vf
* Require python-all-dev (>= 2.7.5-5~)
* Bump std-ver: 3.9.4 -> 3.9.5, no change

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From: Nick Wellnhofer <wellnhofer@aevum.de>
2
 
Date: Sun, 4 Aug 2013 22:15:11 +0000
3
 
Subject: Fix XPath '//' optimization with predicates
4
 
 
5
 
My attempt to optimize XPath expressions containing '//' caused a
6
 
regression reported in bug #695699. This commit disables the
7
 
optimization for expressions of the form '//foo[predicate]'.
8
 
---
9
 
 xpath.c |    5 +++--
10
 
 1 file changed, 3 insertions(+), 2 deletions(-)
11
 
 
12
 
diff --git a/xpath.c b/xpath.c
13
 
index 97410e7..a676989 100644
14
 
--- a/xpath.c
15
 
+++ b/xpath.c
16
 
@@ -14719,8 +14719,9 @@ xmlXPathOptimizeExpression(xmlXPathCompExprPtr comp, xmlXPathStepOpPtr op)
17
 
     * internal representation.
18
 
     */
19
 
 
20
 
-    if ((op->ch1 != -1) &&
21
 
-        (op->op == XPATH_OP_COLLECT /* 11 */))
22
 
+    if ((op->op == XPATH_OP_COLLECT /* 11 */) &&
23
 
+        (op->ch1 != -1) &&
24
 
+        (op->ch2 == -1 /* no predicate */))
25
 
     {
26
 
         xmlXPathStepOpPtr prevop = &comp->steps[op->ch1];
27