mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
Staring to receive bug reports on 2.3.7:
- entities.c: xmlEncodeEntitiesReentrant fixed a few accesses to doc where it wasn't checked against NULL reported by Jens Laas Daniel
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
Tue Apr 24 14:10:38 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
|
* entities.c: xmlEncodeEntitiesReentrant fixed a few accesses
|
||||||
|
to doc where it wasn't checked against NULL reported by
|
||||||
|
Jens Laas
|
||||||
|
|
||||||
Tue Apr 24 13:21:36 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
Tue Apr 24 13:21:36 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
* HTMLparser.c: Jonas Borgstr<74>m patch, the <td>, and <th> elements
|
* HTMLparser.c: Jonas Borgstr<74>m patch, the <td>, and <th> elements
|
||||||
|
@ -643,7 +643,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
|||||||
*/
|
*/
|
||||||
*out++ = *cur;
|
*out++ = *cur;
|
||||||
} else if (*cur >= 0x80) {
|
} else if (*cur >= 0x80) {
|
||||||
if ((doc->encoding != NULL) || (html)) {
|
if (((doc != NULL) && (doc->encoding != NULL)) || (html)) {
|
||||||
/*
|
/*
|
||||||
* Bj<42>rn Reese <br@sseusa.com> provided the patch
|
* Bj<42>rn Reese <br@sseusa.com> provided the patch
|
||||||
xmlChar xc;
|
xmlChar xc;
|
||||||
@ -664,7 +664,8 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
|||||||
if (*cur < 0xC0) {
|
if (*cur < 0xC0) {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"xmlEncodeEntitiesReentrant : input not UTF-8\n");
|
"xmlEncodeEntitiesReentrant : input not UTF-8\n");
|
||||||
doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
|
if (doc != NULL)
|
||||||
|
doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
|
||||||
snprintf(buf, sizeof(buf), "&#%d;", *cur);
|
snprintf(buf, sizeof(buf), "&#%d;", *cur);
|
||||||
buf[sizeof(buf) - 1] = 0;
|
buf[sizeof(buf) - 1] = 0;
|
||||||
ptr = buf;
|
ptr = buf;
|
||||||
@ -695,7 +696,8 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
|||||||
if ((l == 1) || (!IS_CHAR(val))) {
|
if ((l == 1) || (!IS_CHAR(val))) {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"xmlEncodeEntitiesReentrant : char out of range\n");
|
"xmlEncodeEntitiesReentrant : char out of range\n");
|
||||||
doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
|
if (doc != NULL)
|
||||||
|
doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
|
||||||
snprintf(buf, sizeof(buf), "&#%d;", *cur);
|
snprintf(buf, sizeof(buf), "&#%d;", *cur);
|
||||||
buf[sizeof(buf) - 1] = 0;
|
buf[sizeof(buf) - 1] = 0;
|
||||||
ptr = buf;
|
ptr = buf;
|
||||||
|
Reference in New Issue
Block a user