From e7bbfc141c79e3b7f182505815f3d28159b9abf9 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Wed, 12 Sep 2018 13:01:49 +0100 Subject: [PATCH] maildir: alloc mem for headers Fixes #1337 --- maildir/mh.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maildir/mh.c b/maildir/mh.c index dd09838e5..85920e92b 100644 --- a/maildir/mh.c +++ b/maildir/mh.c @@ -1031,6 +1031,11 @@ static bool maildir_add_to_context(struct Context *ctx, struct Maildir *md) { int oldmsgcount = ctx->mailbox->msg_count; + /* Allocate some memory to get started */ + ctx->mailbox->msg_count = 1; + mx_alloc_memory(ctx->mailbox); + ctx->mailbox->msg_count = 0; + while (md) { mutt_debug(2, "Considering %s\n", NONULL(md->canon_fname)); -- 2.40.0