]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lda: Fixed crash in mail_deliver_get_log_var_expand_table().
authorTeemu Huovila <teemu.huovila@dovecot.fi>
Wed, 3 Jun 2015 13:47:25 +0000 (16:47 +0300)
committerTeemu Huovila <teemu.huovila@dovecot.fi>
Wed, 3 Jun 2015 13:47:25 +0000 (16:47 +0300)
Discovered by clang static analyzer. This caused crashes with older versions
of Pigeonhole.

src/lib-lda/mail-deliver.c

index a609c0493c86a55eb30524f0612bea2aa64a4a82..c60b52bb006dc7e2b2ca7357bcf792f610c7be60 100644 (file)
@@ -97,8 +97,8 @@ mail_deliver_get_log_var_expand_table_full(struct mail_deliver_context *ctx,
        if (ctx != NULL) {
                mail_deliver_log_var_expand_table_update_times(ctx, tab);
                tab[8].value = dec2str(ctx->session_time_msecs);
+               tab[9].value = ctx->dest_addr;
        }
-       tab[9].value = ctx->dest_addr;
        return tab;
 }