Babak Vahedipour-Kunze reported that openTag in xmlParseElement was likely

* parser.c: Babak Vahedipour-Kunze reported that openTag in
  xmlParseElement was likely to have been deallocated at the
  time of the report, possibly leading to segfault. Just report
  the tag name now.
Daniel
This commit is contained in:
Daniel Veillard 2002-06-11 07:24:56 +00:00
parent 9e4123023a
commit 38d80e25ad
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,10 @@
Tue Jun 11 09:25:12 CEST 2002 Daniel Veillard <daniel@veillard.com>
* parser.c: Babak Vahedipour-Kunze reported that openTag in
xmlParseElement was likely to have been deallocated at the
time of the report, possibly leading to segfault. Just report
the tag name now.
Mon Jun 10 18:00:02 CEST 2002 Daniel Veillard <daniel@veillard.com>
* xpath.c: patch from Richard Jinks for XPath substring() function

View File

@ -6938,7 +6938,6 @@ xmlParseContent(xmlParserCtxtPtr ctxt) {
void
xmlParseElement(xmlParserCtxtPtr ctxt) {
const xmlChar *openTag = CUR_PTR;
xmlChar *name;
xmlChar *oldname;
xmlParserNodeInfo node_info;
@ -7004,8 +7003,8 @@ xmlParseElement(xmlParserCtxtPtr ctxt) {
ctxt->errNo = XML_ERR_GT_REQUIRED;
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,
"Couldn't find end of Start Tag\n%.30s\n",
openTag);
"Couldn't find end of Start Tag %s\n",
name);
ctxt->wellFormed = 0;
ctxt->disableSAX = 1;
@ -7043,7 +7042,7 @@ xmlParseElement(xmlParserCtxtPtr ctxt) {
ctxt->errNo = XML_ERR_TAG_NOT_FINISHED;
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,
"Premature end of data in tag %.30s\n", openTag);
"Premature end of data in tag %s\n", name);
ctxt->wellFormed = 0;
ctxt->disableSAX = 1;