- lib-charset: Don't assert-crash when iconv() skips lots of invalid input. - lib-storage: When getting decoded headers, don't fail when MIME encoded-words expand to LFs.
23 lines
829 B
Plaintext
23 lines
829 B
Plaintext
$OpenBSD: patch-src_lib-charset_charset-iconv_c,v 1.1 2010/06/27 09:46:18 sthen Exp $
|
|
--- src/lib-charset/charset-iconv.c.orig Sun Jan 24 18:14:17 2010
|
|
+++ src/lib-charset/charset-iconv.c Sat Jun 26 22:33:24 2010
|
|
@@ -131,7 +131,7 @@ charset_to_utf8(struct charset_translation *t,
|
|
{
|
|
bool dtcase = (t->flags & CHARSET_FLAG_DECOMP_TITLECASE) != 0;
|
|
enum charset_result result;
|
|
- size_t pos, used, size, prev_used = 0;
|
|
+ size_t pos, used, size, prev_pos = 0, prev_used = 0;
|
|
bool ret;
|
|
|
|
for (pos = 0;;) {
|
|
@@ -151,7 +151,8 @@ charset_to_utf8(struct charset_translation *t,
|
|
(void)buffer_append_space_unsafe(dest, size);
|
|
buffer_set_used_size(dest, used);
|
|
} else {
|
|
- i_assert(dest->used != prev_used);
|
|
+ i_assert(dest->used != prev_used || pos != prev_pos);
|
|
+ prev_pos = pos;
|
|
prev_used = dest->used;
|
|
}
|
|
}
|