From b711a02659c6db22b88860b31aaa714bffd9dca6 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 30 May 2003 00:40:35 +0300 Subject: [PATCH] bugfix --HG-- branch : HEAD --- src/lib-index/maildir/maildir-sync.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib-index/maildir/maildir-sync.c b/src/lib-index/maildir/maildir-sync.c index e7074f2b2b..7df3ed3d5e 100644 --- a/src/lib-index/maildir/maildir-sync.c +++ b/src/lib-index/maildir/maildir-sync.c @@ -678,6 +678,12 @@ static int maildir_full_sync_init(struct maildir_sync_context *ctx) size_t size; int have_new; + /* FIXME: kludge. we want to have pointers to data file, so we must + make sure that it's base address doesn't change. this call makes + sure it's fully mmaped in memory even when we begin */ + if (mail_index_data_get_mmaped(index->data, &size) == NULL) + return FALSE; + if (index->header->messages_count >= INT_MAX/32) { index_set_corrupted(index, "Header says %u messages", index->header->messages_count); -- 2.47.3