mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-12-27 03:21:26 +03:00
Free input buffer in xmlHaltParser
This avoids miscalculation of available bytes. Thanks to Yunho Kim for the report. Closes: #26
This commit is contained in:
parent
60173c821e
commit
123234f2cf
5
parser.c
5
parser.c
@ -12462,7 +12462,12 @@ xmlHaltParser(xmlParserCtxtPtr ctxt) {
|
||||
ctxt->input->free((xmlChar *) ctxt->input->base);
|
||||
ctxt->input->free = NULL;
|
||||
}
|
||||
if (ctxt->input->buf != NULL) {
|
||||
xmlFreeParserInputBuffer(ctxt->input->buf);
|
||||
ctxt->input->buf = NULL;
|
||||
}
|
||||
ctxt->input->cur = BAD_CAST"";
|
||||
ctxt->input->length = 0;
|
||||
ctxt->input->base = ctxt->input->cur;
|
||||
ctxt->input->end = ctxt->input->cur;
|
||||
}
|
||||
|
@ -21,14 +21,11 @@ Entity: line 1:
|
||||
^
|
||||
./test/errors/759573.xml:1: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
|
||||
|
||||
<?h?><!DOCTYPEt[<!ELEMENT t (A)><!ENTITY % xx '%<![INCLUDE[000%ஸ00
|
||||
^
|
||||
|
||||
^
|
||||
./test/errors/759573.xml:1: parser error : DOCTYPE improperly terminated
|
||||
<?h?><!DOCTYPEt[<!ELEMENT t (A)><!ENTITY % xx '%<![INCLUDE[000%ஸ00
|
||||
^
|
||||
./test/errors/759573.xml:1: parser error : StartTag: invalid element name
|
||||
<?h?><!DOCTYPEt[<!ELEMENT t (A)><!ENTITY % xx '%<![INCLUDE[000%ஸ00
|
||||
^
|
||||
./test/errors/759573.xml:1: parser error : Extra content at the end of the document
|
||||
<?h?><!DOCTYPEt[<!ELEMENT t (A)><!ENTITY % xx '%<![INCLUDE[000%ஸ00
|
||||
^
|
||||
|
||||
^
|
||||
./test/errors/759573.xml:1: parser error : Start tag expected, '<' not found
|
||||
|
||||
^
|
||||
|
Loading…
Reference in New Issue
Block a user