From 36c9e0871a01945f07dc235826f31af6e70d081f Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Mon, 31 May 2010 00:15:43 +0200 Subject: [PATCH] Fix segfaults with ssh tunnels, patch 228671-pipe-mime.patch updated. Thanks Nikolaus Schulz (Closes: #569279) --- debian/changelog | 2 ++ .../patches/upstream/228671-pipe-mime.patch | 24 ++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index fb2758f..526fb51 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ mutt (1.5.20-8~unrel) unreleased; urgency=low * Switch to tokyocabinet (Closes: #530670) * Instead of trying to maintain the PATCHES file, put "quilt applied" output there. + * Fix segfaults with ssh tunnels, patch 228671-pipe-mime.patch updated. + Thanks Nikolaus Schulz (Closes: #569279) -- Christoph Berg Sun, 30 May 2010 23:20:21 +0200 diff --git a/debian/patches/upstream/228671-pipe-mime.patch b/debian/patches/upstream/228671-pipe-mime.patch index ba49e2d..f17b147 100644 --- a/debian/patches/upstream/228671-pipe-mime.patch +++ b/debian/patches/upstream/228671-pipe-mime.patch @@ -2,17 +2,35 @@ Don't draw imap fetch progress if we aren't in visual mode. Drawing progress leaves terminal in confusing state when piping a message from pager to less(1). See http://bugs.mutt.org/1771 +Updated in #569279. + --- a/imap/message.c +++ b/imap/message.c -@@ -489,8 +489,9 @@ +@@ -392,7 +392,7 @@ int imap_fetch_message (MESSAGE *msg, CO + char path[_POSIX_PATH_MAX]; + char *pc; + long bytes; +- progress_t progressbar; ++ progress_t progressbar, *pbar; + int uid; + int cacheno; + IMAP_CACHE *cache; +@@ -489,9 +489,15 @@ int imap_fetch_message (MESSAGE *msg, CO imap_error ("imap_fetch_message()", buf); goto bail; } - mutt_progress_init (&progressbar, _("Fetching message..."), - M_PROGRESS_SIZE, NetInc, bytes); -+ if (!isendwin()) +- if (imap_read_literal (msg->fp, idata, bytes, &progressbar) < 0) ++ if (!isendwin()) ++ { + mutt_progress_init (&progressbar, _("Fetching message..."), + M_PROGRESS_SIZE, NetInc, bytes); - if (imap_read_literal (msg->fp, idata, bytes, &progressbar) < 0) ++ pbar = &progressbar; ++ } ++ else ++ pbar = NULL; ++ 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) -- 2.43.0