mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-28 23:14:57 +03:00
fix a pair of possible out of array char references
When serializing char references back to an character string Reported by Abhishek Arya <inferno@chromium.org>
This commit is contained in:
0
python/setup.py
Executable file → Normal file
0
python/setup.py
Executable file → Normal file
@@ -248,7 +248,7 @@ xmlEscapeEntities(unsigned char* out, int *outlen,
|
|||||||
/*
|
/*
|
||||||
* We assume we have UTF-8 input.
|
* We assume we have UTF-8 input.
|
||||||
*/
|
*/
|
||||||
if (outend - out < 10) break;
|
if (outend - out < 11) break;
|
||||||
|
|
||||||
if (*in < 0xC0) {
|
if (*in < 0xC0) {
|
||||||
xmlSaveErr(XML_SAVE_NOT_UTF8, NULL, NULL);
|
xmlSaveErr(XML_SAVE_NOT_UTF8, NULL, NULL);
|
||||||
@@ -2002,7 +2002,7 @@ xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc,
|
|||||||
/*
|
/*
|
||||||
* We assume we have UTF-8 content.
|
* We assume we have UTF-8 content.
|
||||||
*/
|
*/
|
||||||
unsigned char tmp[10];
|
unsigned char tmp[12];
|
||||||
int val = 0, l = 1;
|
int val = 0, l = 1;
|
||||||
|
|
||||||
if (base != cur)
|
if (base != cur)
|
||||||
|
|||||||
Reference in New Issue
Block a user