changeset 18819:06505210b25d

lib-lda: Fixed crash in mail_deliver_get_log_var_expand_table(). Discovered by clang static analyzer. This caused crashes with older versions of Pigeonhole.
author Teemu Huovila <teemu.huovila@dovecot.fi>
date Wed, 03 Jun 2015 16:47:25 +0300
parents c909977ec1a1
children 9e7d1e2acd23
files src/lib-lda/mail-deliver.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-lda/mail-deliver.c	Wed Jun 03 01:04:49 2015 +0300
+++ b/src/lib-lda/mail-deliver.c	Wed Jun 03 16:47:25 2015 +0300
@@ -97,8 +97,8 @@
 	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;
 }