mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-30 22:43:14 +03:00
fixed a bug in the ISO-Latin 1 to UTF8 encoder raised by Morus Walter
* encoding.c: fixed a bug in the ISO-Latin 1 to UTF8 encoder raised by Morus Walter Daniel
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Thu Mar 21 14:25:29 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* encoding.c: fixed a bug in the ISO-Latin 1 to UTF8 encoder
|
||||||
|
raised by Morus Walter
|
||||||
|
|
||||||
Thu Mar 21 14:07:13 CET 2002 Daniel Veillard <daniel@veillard.com>
|
Thu Mar 21 14:07:13 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* xmlcatalog.c include/libxml/xmlversion.h.in: applied 2 fixups
|
* xmlcatalog.c include/libxml/xmlversion.h.in: applied 2 fixups
|
||||||
|
@ -577,9 +577,13 @@ isolat1ToUTF8(unsigned char* out, int *outlen,
|
|||||||
processed++;
|
processed++;
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
*out++= ((c >> 6) & 0x1F) | 0xC0;
|
/*
|
||||||
if (out >= outend)
|
* make sure there is 2 chars left in advance
|
||||||
|
*/
|
||||||
|
if (out + 1 >= outend) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
*out++= ((c >> 6) & 0x1F) | 0xC0;
|
||||||
*out++= (c & 0x3F) | 0x80;
|
*out++= (c & 0x3F) | 0x80;
|
||||||
processed++;
|
processed++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user