1
0
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:
Daniel Veillard
2012-01-22 17:42:35 +08:00
parent 04b489cda3
commit 0795348aeb
2 changed files with 2 additions and 2 deletions

0
python/setup.py Executable file → Normal file
View File

View 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)