dovecot-2.2: imapc: Don't crash in mailbox_is_inconsistent() wit...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Mar 18 23:25:37 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/995df5989e56
changeset: 18373:995df5989e56
user: Timo Sirainen <tss at iki.fi>
date: Thu Mar 19 01:21:20 2015 +0200
description:
imapc: Don't crash in mailbox_is_inconsistent() with unopened mailbox.
diffstat:
src/lib-storage/index/imapc/imapc-storage.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r cbdfca7d24a6 -r 995df5989e56 src/lib-storage/index/imapc/imapc-storage.c
--- a/src/lib-storage/index/imapc/imapc-storage.c Thu Mar 19 01:20:38 2015 +0200
+++ b/src/lib-storage/index/imapc/imapc-storage.c Thu Mar 19 01:21:20 2015 +0200
@@ -941,10 +941,12 @@
{
struct imapc_mailbox *mbox = (struct imapc_mailbox *)box;
- if (mail_index_view_is_inconsistent(box->view))
+ if (box->view != NULL &&
+ mail_index_view_is_inconsistent(box->view))
return TRUE;
- return !imapc_client_mailbox_is_opened(mbox->client_box);
+ return mbox->client_box == NULL ? FALSE :
+ !imapc_client_mailbox_is_opened(mbox->client_box);
}
struct mail_storage imapc_storage = {
More information about the dovecot-cvs
mailing list