dovecot: Fixed handling invalid charset input. Replace it with r...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jan 22 09:35:10 EET 2008
details: http://hg.dovecot.org/dovecot/rev/d48c419a27ca
changeset: 7186:d48c419a27ca
user: Timo Sirainen <tss at iki.fi>
date: Tue Jan 22 09:32:27 2008 +0200
description:
Fixed handling invalid charset input. Replace it with replacement character.
diffstat:
1 file changed, 2 insertions(+)
src/lib-charset/charset-iconv.c | 2 ++
diffs (12 lines):
diff -r 6f014a866f38 -r d48c419a27ca src/lib-charset/charset-iconv.c
--- a/src/lib-charset/charset-iconv.c Tue Jan 22 09:31:59 2008 +0200
+++ b/src/lib-charset/charset-iconv.c Tue Jan 22 09:32:27 2008 +0200
@@ -104,6 +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);
+ uni_ucs4_to_utf8_c(UNICODE_REPLACEMENT_CHAR, dest);
return TRUE;
}
*src_size -= srcleft;
More information about the dovecot-cvs
mailing list