diff options
author | Daniel Veillard <veillard@redhat.com> | 2011-12-16 18:53:35 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2011-12-16 18:53:35 +0800 |
commit | 5bd3c061823a8499b27422aee04ea20aae24f03e (patch) | |
tree | e0ec79f58dfd96dd402a65f0e0ad29cb09d7f980 /parser.c | |
parent | 77404b8b69bc122d12231807abf1a837d121b551 (diff) | |
download | libxml2-5bd3c061823a8499b27422aee04ea20aae24f03e.tar.gz |
Fix an allocation error when copying entities
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2709,7 +2709,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, buffer[nbchars++] = '&'; if (nbchars > buffer_size - i - XML_PARSER_BUFFER_SIZE) { - growBuffer(buffer, XML_PARSER_BUFFER_SIZE); + growBuffer(buffer, i + XML_PARSER_BUFFER_SIZE); } for (;i > 0;i--) buffer[nbchars++] = *cur++; |