From: Pietro Cerutti Date: Thu, 28 Sep 2017 12:06:51 +0000 (+0000) Subject: Fix segfault when pipe'ing a deleted message X-Git-Tag: neomutt-20171208~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=67b22c683fac1802ebf23438124c6d05eda2926a;p=neomutt Fix segfault when pipe'ing a deleted message Fixes #796 --- diff --git a/copy.c b/copy.c index 0b3c64bae..e0b473c93 100644 --- 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))) {