]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
message-decode: Minor fix to previous change.
authorTimo Sirainen <tss@iki.fi>
Wed, 27 Feb 2013 11:07:35 +0000 (13:07 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 27 Feb 2013 11:07:35 +0000 (13:07 +0200)
The == condition should probably never happen, but handle it anyway.

src/lib-mail/message-decoder.c

index 5645f3bc24805d4e2fb641d7874785888eeeda8b..d4db2df975a71d1f24ee26b59b72a79ebafe34ad 100644 (file)
@@ -222,7 +222,7 @@ static void translation_buf_decode(struct message_decoder_context *ctx,
        (void)charset_to_utf8(ctx->charset_trans, trans_buf,
                              &trans_size, ctx->buf2);
 
-       if (trans_size < ctx->translation_size) {
+       if (trans_size <= ctx->translation_size) {
                /* need more data to finish the translation. */
                i_assert(orig_size < MAX_TRANSLATION_BUF_SIZE);
                memcpy(ctx->translation_buf, trans_buf, orig_size);