[libxml2] Fix a failure to report xmlreader parsing failures
- From: Daniel Veillard <veillard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix a failure to report xmlreader parsing failures
- Date: Wed, 18 Jul 2012 10:07:06 +0000 (UTC)
commit c508fa3f0b40ba232e00ed8d514e0ba37ed602ab
Author: Daniel Veillard <veillard redhat com>
Date: Wed Jul 18 17:39:56 2012 +0800
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
xmlreader.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/xmlreader.c b/xmlreader.c
index 77ac71b..10417ee 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]