summaryrefslogtreecommitdiffstats
path: root/third_party/libxml/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libxml/parser.c')
-rw-r--r--third_party/libxml/parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/third_party/libxml/parser.c b/third_party/libxml/parser.c
index d12f429..fab0ea8 100644
--- a/third_party/libxml/parser.c
+++ b/third_party/libxml/parser.c
@@ -2307,6 +2307,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
*/
#define growBuffer(buffer) { \
xmlChar *tmp; \
+ buffer##_size += XML_PARSER_BUFFER_SIZE ; \
buffer##_size *= 2; \
tmp = (xmlChar *) \
xmlRealloc(buffer, buffer##_size * sizeof(xmlChar)); \
@@ -3347,7 +3348,7 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
* Just output the reference
*/
buf[len++] = '&';
- if (len > buf_size - i - 10) {
+ while (len > buf_size - i - 10) {
growBuffer(buf);
}
for (;i > 0;i--)