From: Timo Sirainen Date: Mon, 8 Aug 2016 09:36:48 +0000 (+0300) Subject: doveadm: Extra safety - initialize cmd_input_fd to -1 X-Git-Tag: 2.2.26~395 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=25c21471977f9ff0cdd8e6882904b78c7d5834b5;p=thirdparty%2Fdovecot%2Fcore.git 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.) --- diff --git a/src/doveadm/doveadm-mail.c b/src/doveadm/doveadm-mail.c index 1c6c396ef9..3044d10eef 100644 --- a/src/doveadm/doveadm-mail.c +++ b/src/doveadm/doveadm-mail.c @@ -125,6 +125,7 @@ doveadm_mail_cmd_alloc_size(size_t size) pool = pool_alloconly_create("doveadm mail cmd", 1024); ctx = p_malloc(pool, size); ctx->pool = pool; + ctx->cmd_input_fd = -1; return ctx; }