aboutsummaryrefslogtreecommitdiffstats
path: root/parser.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2004-02-12 11:57:52 +0000
committerDaniel Veillard <veillard@src.gnome.org>2004-02-12 11:57:52 +0000
commit036143bb535dd7829c3877d3c51f5d6e1298f07e (patch)
tree14d7189e14588287f5d6e1f5af3467f7a0060a3c /parser.c
parent3671190b546760a9e10d2e683257c3a86c680816 (diff)
downloadandroid_external_libxml2-036143bb535dd7829c3877d3c51f5d6e1298f07e.tar.gz
android_external_libxml2-036143bb535dd7829c3877d3c51f5d6e1298f07e.tar.bz2
android_external_libxml2-036143bb535dd7829c3877d3c51f5d6e1298f07e.zip
fixed bug #132575 about finding the end of the internal subset in push
* parser.c: fixed bug #132575 about finding the end of the internal subset in push mode. * test/intsubset.xml result/intsubset.xml* result/noent/intsubset.xml: added the test to the regression suite Daniel
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/parser.c b/parser.c
index d8b7f3b6..92cb3829 100644
--- a/parser.c
+++ b/parser.c
@@ -9477,6 +9477,29 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
quote = 0;
continue;
}
+ if ((quote == 0) && (buf[base] == '<')) {
+ int found = 0;
+ /* special handling of comments */
+ if (((unsigned int) base + 4 <
+ ctxt->input->buf->buffer->use) &&
+ (buf[base + 1] == '!') &&
+ (buf[base + 2] == '-') &&
+ (buf[base + 3] == '-')) {
+ for (;(unsigned int) base + 3 <
+ ctxt->input->buf->buffer->use; base++) {
+ if ((buf[base] == '-') &&
+ (buf[base + 1] == '-') &&
+ (buf[base + 2] == '>')) {
+ found = 1;
+ base += 2;
+ break;
+ }
+ }
+ if (!found)
+ break;
+ continue;
+ }
+ }
if (buf[base] == '"') {
quote = '"';
continue;