mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-07 06:43:02 +03:00
Jirka Kosek pointer out a bug in xmlParseTextDecl() when the version info
* parser.c: Jirka Kosek pointer out a bug in xmlParseTextDecl() when the version info is not present. Daniel
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
Mon Jan 7 17:52:48 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* parser.c: Jirka Kosek pointer out a bug in xmlParseTextDecl()
|
||||
when the version info is not present.
|
||||
|
||||
Mon Jan 7 00:03:58 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* tree.c: Anthony Jones pointed out a problem in
|
||||
|
12
parser.c
12
parser.c
@@ -4961,11 +4961,7 @@ xmlParseTextDecl(xmlParserCtxtPtr ctxt) {
|
||||
version = xmlParseVersionInfo(ctxt);
|
||||
if (version == NULL)
|
||||
version = xmlCharStrdup(XML_DEFAULT_VERSION);
|
||||
ctxt->input->version = version;
|
||||
|
||||
/*
|
||||
* We must have the encoding declaration
|
||||
*/
|
||||
else {
|
||||
if (!IS_BLANK(CUR)) {
|
||||
ctxt->errNo = XML_ERR_SPACE_REQUIRED;
|
||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||
@@ -4973,6 +4969,12 @@ xmlParseTextDecl(xmlParserCtxtPtr ctxt) {
|
||||
ctxt->wellFormed = 0;
|
||||
ctxt->disableSAX = 1;
|
||||
}
|
||||
}
|
||||
ctxt->input->version = version;
|
||||
|
||||
/*
|
||||
* We must have the encoding declaration
|
||||
*/
|
||||
xmlParseEncodingDecl(ctxt);
|
||||
if (ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) {
|
||||
/*
|
||||
|
Reference in New Issue
Block a user