Commit 401c2114 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

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
parent 6f42c136
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
......
......@@ -4961,18 +4961,20 @@ xmlParseTextDecl(xmlParserCtxtPtr ctxt) {
version = xmlParseVersionInfo(ctxt);
if (version == NULL)
version = xmlCharStrdup(XML_DEFAULT_VERSION);
else {
if (!IS_BLANK(CUR)) {
ctxt->errNo = XML_ERR_SPACE_REQUIRED;
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData, "Space needed here\n");
ctxt->wellFormed = 0;
ctxt->disableSAX = 1;
}
}
ctxt->input->version = version;
/*
* We must have the encoding declaration
*/
if (!IS_BLANK(CUR)) {
ctxt->errNo = XML_ERR_SPACE_REQUIRED;
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData, "Space needed here\n");
ctxt->wellFormed = 0;
ctxt->disableSAX = 1;
}
xmlParseEncodingDecl(ctxt);
if (ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) {
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment