dovecot-1.1: Crashfix for converting invalid input to UTF-8.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Feb 14 21:48:12 EET 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/fcfe2ea5c3ed
changeset: 7240:fcfe2ea5c3ed
user: Timo Sirainen <tss at iki.fi>
date: Thu Feb 14 21:48:18 2008 +0200
description:
Crashfix for converting invalid input to UTF-8.
diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
src/lib-charset/charset-iconv.c | 3 ++-
diffs (13 lines):
diff -r 0e8339ad1932 -r fcfe2ea5c3ed src/lib-charset/charset-iconv.c
--- a/src/lib-charset/charset-iconv.c Wed Feb 13 20:23:11 2008 +0200
+++ b/src/lib-charset/charset-iconv.c Thu Feb 14 21:48:18 2008 +0200
@@ -104,7 +104,8 @@ charset_to_utf8_try(struct charset_trans
else {
/* should be EILSEQ */
*result = CHARSET_RET_INVALID_INPUT;
- buffer_set_used_size(dest, dest->used - destleft);
+ if (!dtcase)
+ buffer_set_used_size(dest, dest->used - destleft);
uni_ucs4_to_utf8_c(UNICODE_REPLACEMENT_CHAR, dest);
return TRUE;
}
More information about the dovecot-cvs
mailing list