dovecot-2.0: dbox: Fixed crash on creation of a new mailbox.

dovecot at dovecot.org dovecot at dovecot.org
Wed Mar 16 18:40:41 EET 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/310f2784de31
changeset: 12686:310f2784de31
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Mar 16 18:40:40 2011 +0200
description:
dbox: Fixed crash on creation of a new mailbox.
Broken by recent changes.

diffstat:

 src/lib-storage/index/dbox-multi/mdbox-storage.c  |  2 +-
 src/lib-storage/index/dbox-single/sdbox-storage.c |  2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 46d46fa3929f -r 310f2784de31 src/lib-storage/index/dbox-multi/mdbox-storage.c
--- a/src/lib-storage/index/dbox-multi/mdbox-storage.c	Wed Mar 16 18:37:14 2011 +0200
+++ b/src/lib-storage/index/dbox-multi/mdbox-storage.c	Wed Mar 16 18:40:40 2011 +0200
@@ -225,7 +225,7 @@
 			offsetof(struct mail_index_header, next_uid),
 			&uid_next, sizeof(uid_next), TRUE);
 	}
-	if (update->min_first_recent_uid != 0 &&
+	if (update != NULL && update->min_first_recent_uid != 0 &&
 	    hdr->first_recent_uid < update->min_first_recent_uid) {
 		uint32_t first_recent_uid = update->min_first_recent_uid;
 
diff -r 46d46fa3929f -r 310f2784de31 src/lib-storage/index/dbox-single/sdbox-storage.c
--- a/src/lib-storage/index/dbox-single/sdbox-storage.c	Wed Mar 16 18:37:14 2011 +0200
+++ b/src/lib-storage/index/dbox-single/sdbox-storage.c	Wed Mar 16 18:40:40 2011 +0200
@@ -159,7 +159,7 @@
 			offsetof(struct mail_index_header, next_uid),
 			&uid_next, sizeof(uid_next), TRUE);
 	}
-	if (update->min_first_recent_uid != 0 &&
+	if (update != NULL && update->min_first_recent_uid != 0 &&
 	    hdr->first_recent_uid < update->min_first_recent_uid) {
 		uint32_t first_recent_uid = update->min_first_recent_uid;
 


More information about the dovecot-cvs mailing list