aboutsummaryrefslogtreecommitdiffstats
path: root/xmlreader.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@redhat.com>2012-07-18 17:39:56 +0800
committerDaniel Veillard <veillard@redhat.com>2012-07-18 17:48:06 +0800
commitc508fa3f0b40ba232e00ed8d514e0ba37ed602ab (patch)
tree595eb6a01e25510041b71313dc5a90d2312ba1aa /xmlreader.c
parent549f06a8bd984eb4d15e330e518bdcff42a4d219 (diff)
downloadandroid_external_libxml2-c508fa3f0b40ba232e00ed8d514e0ba37ed602ab.tar.gz
android_external_libxml2-c508fa3f0b40ba232e00ed8d514e0ba37ed602ab.tar.bz2
android_external_libxml2-c508fa3f0b40ba232e00ed8d514e0ba37ed602ab.zip
Fix a failure to report xmlreader parsing failures
Related to https://bugzilla.gnome.org/show_bug.cgi?id=654567 the problem is that the provided patch failed to raise an error on xmlTextReaderRead() return when an actual parsing error occured
Diffstat (limited to 'xmlreader.c')
-rw-r--r--xmlreader.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xmlreader.c b/xmlreader.c
index 77ac71b7..10417ee1 100644
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -907,8 +907,11 @@ xmlTextReaderPushData(xmlTextReaderPtr reader) {
}
}
reader->state = oldstate;
- if (reader->ctxt->wellFormed == 0)
+ if (reader->ctxt->wellFormed == 0) {
reader->mode = XML_TEXTREADER_MODE_EOF;
+ return(-1);
+ }
+
return(0);
}