]> granicus.if.org Git - neomutt/commitdiff
Fix segfault when pipe'ing a deleted message
authorPietro Cerutti <gahr@gahr.ch>
Thu, 28 Sep 2017 12:06:51 +0000 (12:06 +0000)
committerRichard Russon <rich@flatcap.org>
Thu, 7 Dec 2017 16:35:32 +0000 (16:35 +0000)
Fixes #796

copy.c

diff --git a/copy.c b/copy.c
index 0b3c64baeee7c7951f11ce040d1d35c1c208b6d8..e0b473c93fc348b639d4ad0bb21b969a1c07b8f6 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -761,6 +761,8 @@ int mutt_copy_message_ctx(FILE *fpout, struct Context *src, struct Header *hdr,
   msg = mx_open_message(src, hdr->msgno);
   if (!msg)
     return -1;
+  if (!hdr->content)
+    return -1;
   r = mutt_copy_message_fp(fpout, msg->fp, hdr, flags, chflags);
   if ((r == 0) && (ferror(fpout) || feof(fpout)))
   {