summaryrefslogtreecommitdiffstats
path: root/mbox.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1999-02-22 11:10:14 +0000
committerThomas Roessler <roessler@does-not-exist.org>1999-02-22 11:10:14 +0000
commit03a78e3bc1ba3453491c86ff7aa72c89aeeda228 (patch)
tree1aa3f12f5f3cce847629a62124ef3011a725f884 /mbox.c
parentbb267742b02935a24e957a02f73a0290946a78e8 (diff)
Avoid reading past actual headers when reopening mailboxes. From
Daniel Eisenbud.
Diffstat (limited to 'mbox.c')
-rw-r--r--mbox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mbox.c b/mbox.c
index 752803b9..175b24a7 100644
--- a/mbox.c
+++ b/mbox.c
@@ -1107,7 +1107,7 @@ int mutt_reopen_mailbox (CONTEXT *ctx, int *index_hint)
}
if (!found)
{
- for (j = 0; j < i; j++)
+ for (j = 0; j < i && j < old_msgcount; j++)
{
if (old_hdrs[j] == NULL)
continue;