Commit 0795348a authored by Daniel Veillard's avatar Daniel Veillard
Browse files

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>
parent 04b489cd
File mode changed from 100755 to 100644
......@@ -248,7 +248,7 @@ xmlEscapeEntities(unsigned char* out, int *outlen,
/*
* We assume we have UTF-8 input.
*/
if (outend - out < 10) break;
if (outend - out < 11) break;
if (*in < 0xC0) {
xmlSaveErr(XML_SAVE_NOT_UTF8, NULL, NULL);
......@@ -2002,7 +2002,7 @@ xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc,
/*
* We assume we have UTF-8 content.
*/
unsigned char tmp[10];
unsigned char tmp[12];
int val = 0, l = 1;
if (base != cur)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment