1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-20 16:43:05 +03:00

allocation error #119784 raised by Oliver Stoeneberg Daniel

* HTMLparser.c: allocation error #119784 raised by Oliver Stoeneberg
Daniel
This commit is contained in:
Daniel Veillard
2003-08-14 23:39:01 +00:00
parent 608d0ac938
commit e8ed62033c
2 changed files with 5 additions and 2 deletions

View File

@ -4273,7 +4273,7 @@ htmlCreateDocParserCtxt(xmlChar *cur, const char *encoding ATTRIBUTE_UNUSED) {
if (ctxt->input->encoding != NULL)
xmlFree((xmlChar *) ctxt->input->encoding);
ctxt->input->encoding = (const xmlChar *) encoding;
ctxt->input->encoding = xmlStrdup((const xmlChar *) encoding);
enc = xmlParseCharEncoding(encoding);
/*
@ -4285,7 +4285,6 @@ htmlCreateDocParserCtxt(xmlChar *cur, const char *encoding ATTRIBUTE_UNUSED) {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,
"Unsupported encoding %s\n", encoding);
ctxt->input->encoding = NULL;
}
} else {
/*