Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Unified Diff: third_party/libxml/pattern.c

Issue 2951008: Update libxml to 2.7.7. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/libxml/pattern.c
diff --git a/third_party/libxml/pattern.c b/third_party/libxml/pattern.c
index ee5196846c8dcbbee131df01d2fdc5ca664aad61..0e38c2dd21fe63e2159ca86fbbb4ed498ed9e753 100644
--- a/third_party/libxml/pattern.c
+++ b/third_party/libxml/pattern.c
@@ -2285,9 +2285,13 @@ xmlStreamPop(xmlStreamCtxtPtr stream) {
if (stream->blockLevel == stream->level)
stream->blockLevel = -1;
- stream->level--;
- if (stream->level < 0)
- return(-1);
+ /*
+ * stream->level can be zero when XML_FINAL_IS_ANY_NODE is set
+ * (see the thread at
+ * http://mail.gnome.org/archives/xslt/2008-July/msg00027.html)
+ */
+ if (stream->level)
+ stream->level--;
/*
* Check evolution of existing states
*/

Powered by Google App Engine
This is Rietveld 408576698