mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-23 01:52:48 +03:00
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
This commit is contained in:
23
parser.c
23
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;
|
||||
|
Reference in New Issue
Block a user