summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authorcevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-18 01:24:47 +0000
committercevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-18 01:24:47 +0000
commit4b41418a14d224fcc3dcd8b1b5923920ea709d5c (patch)
tree6362677e77740b0f68ce8c9cc1f69cda1d388023 /third_party
parent23ff150bcf155e3d99e0cc03a2b3531e706ca175 (diff)
downloadchromium_src-4b41418a14d224fcc3dcd8b1b5923920ea709d5c.zip
chromium_src-4b41418a14d224fcc3dcd8b1b5923920ea709d5c.tar.gz
chromium_src-4b41418a14d224fcc3dcd8b1b5923920ea709d5c.tar.bz2
Fix XPath bug from upstream.
BUG=63444 TEST=See bug Review URL: http://codereview.chromium.org/5196003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66567 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/libxml/README.chromium1
-rw-r--r--third_party/libxml/src/xpath.c12
2 files changed, 9 insertions, 4 deletions
diff --git a/third_party/libxml/README.chromium b/third_party/libxml/README.chromium
index 832678a..89dda3c 100644
--- a/third_party/libxml/README.chromium
+++ b/third_party/libxml/README.chromium
@@ -11,6 +11,7 @@ Current version: 2.7.7.
Modifications:
- Import XPath fix http://git.gnome.org/browse/libxml2/commit/?id=91d19754d46acd4a639a8b9e31f50f31c78f8c9c
- Import follow-on for above commit: http://git.gnome.org/browse/libxml2/commit/?id=ea90b894146030c214a7df6d8375310174f134b9
+- Import additional XPath fix http://git.gnome.org/browse/libxml2/commit/?id=df83c17e5a2646bd923f75e5e507bc80d73c9722
To import a new snapshot of libxml:
diff --git a/third_party/libxml/src/xpath.c b/third_party/libxml/src/xpath.c
index 5d3474e..b0a9c60 100644
--- a/third_party/libxml/src/xpath.c
+++ b/third_party/libxml/src/xpath.c
@@ -11752,11 +11752,15 @@ xmlXPathCompOpEvalPositionalPredicate(xmlXPathParserContextPtr ctxt,
if ((ctxt->error != XPATH_EXPRESSION_OK) || (res == -1)) {
xmlXPathObjectPtr tmp;
- /* pop the result */
+ /* pop the result if any */
tmp = valuePop(ctxt);
- xmlXPathReleaseObject(xpctxt, tmp);
- /* then pop off contextObj, which will be freed later */
- valuePop(ctxt);
+ if (tmp != contextObj)
+ /*
+ * Free up the result
+ * then pop off contextObj, which will be freed later
+ */
+ xmlXPathReleaseObject(xpctxt, tmp);
+ valuePop(ctxt);
goto evaluation_error;
}