changeset 20606:1745891bea9a

doveadm: Extra safety - initialize cmd_input_fd to -1 Just to be sure it's never attempted to be accessed as 0 (stdin) before being initialized. (It didn't happen with current code as far as I know.)
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Mon, 08 Aug 2016 12:36:48 +0300
parents b7616318f4d0
children 778bf8914a7f
files src/doveadm/doveadm-mail.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/doveadm/doveadm-mail.c	Mon Aug 08 16:15:26 2016 +0300
+++ b/src/doveadm/doveadm-mail.c	Mon Aug 08 12:36:48 2016 +0300
@@ -125,6 +125,7 @@
 	pool = pool_alloconly_create("doveadm mail cmd", 1024);
 	ctx = p_malloc(pool, size);
 	ctx->pool = pool;
+	ctx->cmd_input_fd = -1;
 	return ctx;
 }