diff --git a/ChangeLog b/ChangeLog index e6813ffc..b2c62725 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Aug 15 01:37:10 CEST 2003 Daniel Veillard + + * HTMLparser.c: allocation error #119784 raised by Oliver Stoeneberg + Fri Aug 15 00:41:58 CEST 2003 Daniel Veillard * uri.c: fixing an use of strcpy() where both strings overlap diff --git a/HTMLparser.c b/HTMLparser.c index 8f9cfff3..28617fe1 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -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 { /*