Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 036143b

Browse files
author
Daniel Veillard
committed
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
1 parent 3671190 commit 036143b

File tree

7 files changed

+57
-0
lines changed

7 files changed

+57
-0
lines changed

Diff for: ChangeLog

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Thu Feb 12 12:54:26 CET 2004 Daniel Veillard <[email protected]>
2+
3+
* parser.c: fixed bug #132575 about finding the end of the
4+
internal subset in push mode.
5+
* test/intsubset.xml result/intsubset.xml* result/noent/intsubset.xml:
6+
added the test to the regression suite
7+
18
Wed Feb 11 14:19:31 CET 2004 Daniel Veillard <[email protected]>
29

310
* parserInternals.c xmlIO.c encoding.c include/libxml/parser.h

Diff for: parser.c

+23
Original file line numberDiff line numberDiff line change
@@ -9477,6 +9477,29 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
94779477
quote = 0;
94789478
continue;
94799479
}
9480+
if ((quote == 0) && (buf[base] == '<')) {
9481+
int found = 0;
9482+
/* special handling of comments */
9483+
if (((unsigned int) base + 4 <
9484+
ctxt->input->buf->buffer->use) &&
9485+
(buf[base + 1] == '!') &&
9486+
(buf[base + 2] == '-') &&
9487+
(buf[base + 3] == '-')) {
9488+
for (;(unsigned int) base + 3 <
9489+
ctxt->input->buf->buffer->use; base++) {
9490+
if ((buf[base] == '-') &&
9491+
(buf[base + 1] == '-') &&
9492+
(buf[base + 2] == '>')) {
9493+
found = 1;
9494+
base += 2;
9495+
break;
9496+
}
9497+
}
9498+
if (!found)
9499+
break;
9500+
continue;
9501+
}
9502+
}
94809503
if (buf[base] == '"') {
94819504
quote = '"';
94829505
continue;

Diff for: result/intsubset.xml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" standalone="yes"?>
2+
<!DOCTYPE root [
3+
<!ELEMENT root EMPTY>
4+
<!-- " -->]>
5+
<root/>

Diff for: result/intsubset.xml.rdr

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
0 10 root 0 0
2+
0 1 root 1 0

Diff for: result/intsubset.xml.sax

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
SAX.setDocumentLocator()
2+
SAX.startDocument()
3+
SAX.internalSubset(root, , )
4+
SAX.elementDecl(root, 1, ...)
5+
SAX.comment( " )
6+
SAX.externalSubset(root, , )
7+
SAX.startElement(root)
8+
SAX.endElement(root)
9+
SAX.endDocument()

Diff for: result/noent/intsubset.xml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" standalone="yes"?>
2+
<!DOCTYPE root [
3+
<!ELEMENT root EMPTY>
4+
<!-- " -->]>
5+
<root/>

Diff for: test/intsubset.xml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" standalone="yes"?>
2+
<!DOCTYPE root [
3+
<!ELEMENT root EMPTY>
4+
<!-- " -->
5+
]>
6+
<root/>

0 commit comments

Comments
 (0)