]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-mail: Fixed crash in message-decoder with unknown charsets.
authorTimo Sirainen <tss@iki.fi>
Wed, 14 Jan 2015 23:10:11 +0000 (01:10 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 14 Jan 2015 23:10:11 +0000 (01:10 +0200)
Caused by earlier changes.

src/lib-mail/message-decoder.c

index 68d65c4c58ef258957cd794e937a85adac492363..869aa70897192f2e95312849f4878b45beb79dd8 100644 (file)
@@ -254,7 +254,7 @@ message_decode_body_init_charset(struct message_decoder_context *ctx,
                                              ctx->content_charset : "UTF-8");
        if (charset_to_utf8_begin(ctx->charset_trans_charset, ctx->normalizer,
                                  &ctx->charset_trans) < 0)
-               ctx->charset_trans = NULL;
+               ctx->charset_trans = charset_utf8_to_utf8_begin(ctx->normalizer);
 }
 
 static bool message_decode_body(struct message_decoder_context *ctx,