Package: mutt
Version: 1.7.2-1
Severity: important
Tags: patch

Uninitialized progressbar causes segfaults when when piping
IMAP messages from the index to commands.  I hit segfaults
when I try to apply patches with the from the index with the
following macro:

  macro index A ":unset pipe_decode\n|(umask 0022 && git am -3)\n:set 
pipe_decode\n"

This problem only affects 1.7.2-1 in Debian stretch, mutt 1.10.0
handles the problem differently.
>From 203648db06effe40d826cbf07f637c02a766ad8d Mon Sep 17 00:00:00 2001
From: Eric Wong <e...@80x24.org>
Date: Thu, 21 Jun 2018 21:51:11 +0000
Subject: [PATCH] imap/message: fix segfault from uninitialized progressbar

Uninitialized progressbar causes segfaults when when piping
IMAP messages from the index to commands.  I hit segfaults
when I try to apply patches with the from the index with the
following macro:

  macro index A ":unset pipe_decode\n|(umask 0022 && git am -3)\n:set pipe_decode\n"

This problem only affects 1.7.2-1 in Debian stretch, mutt 1.10.0
handles the problem differently.
---
 imap/message.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/imap/message.c b/imap/message.c
index 75251af..f854424 100644
--- a/imap/message.c
+++ b/imap/message.c
@@ -508,7 +508,7 @@ int imap_fetch_message (CONTEXT *ctx, MESSAGE *msg, int msgno)
 	  }
 	  else
 	    pbar = NULL;
-	  if (imap_read_literal (msg->fp, idata, bytes, &progressbar) < 0)
+	  if (imap_read_literal (msg->fp, idata, bytes, pbar) < 0)
 	    goto bail;
 	  /* pick up trailing line */
 	  if ((rc = imap_cmd_step (idata)) != IMAP_CMD_CONTINUE)
-- 
EW

Reply via email to