From f124539f7abb8be0d4797ede3d207c77c68c97da Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Thu, 3 Apr 2008 09:46:34 +0000 Subject: [PATCH] buffer may not be large enough to convert to UCS4, patch from Christian * encoding.c: buffer may not be large enough to convert to UCS4, patch from Christian Fruth , fixes #504015 Daniel svn path=/trunk/; revision=3727 --- ChangeLog | 5 +++++ encoding.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 22fca102..ce64bee0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Apr 3 11:44:57 CEST 2008 Daniel Veillard + + * encoding.c: buffer may not be large enough to convert to + UCS4, patch from Christian Fruth , fixes #504015 + Thu Apr 3 11:02:02 CEST 2008 Daniel Veillard * HTMLparser.c: apparently it's okay to forget the semicolumn after diff --git a/encoding.c b/encoding.c index 6d7a4cec..6c49fff1 100644 --- a/encoding.c +++ b/encoding.c @@ -1992,8 +1992,8 @@ retry: toconv = in->use; if (toconv == 0) return(0); - if (toconv * 2 >= written) { - xmlBufferGrow(out, toconv * 2); + if (toconv * 4 >= written) { + xmlBufferGrow(out, toconv * 4); written = out->size - out->use - 1; } if (handler->output != NULL) {