dovecot-2.2: sdbox: If sdbox header is corrupted, resize it to m...

dovecot at dovecot.org dovecot at dovecot.org
Tue Jun 18 18:54:32 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/07642120b6ea
changeset: 16536:07642120b6ea
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jun 18 18:54:20 2013 +0300
description:
sdbox: If sdbox header is corrupted, resize it to make sure its size is correct.

diffstat:

 src/lib-storage/index/dbox-single/sdbox-storage.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r 3683d7bff095 -r 07642120b6ea src/lib-storage/index/dbox-single/sdbox-storage.c
--- a/src/lib-storage/index/dbox-single/sdbox-storage.c	Tue Jun 18 17:05:20 2013 +0300
+++ b/src/lib-storage/index/dbox-single/sdbox-storage.c	Tue Jun 18 18:54:20 2013 +0300
@@ -185,8 +185,10 @@
 	struct sdbox_index_header hdr, new_hdr;
 	bool need_resize;
 
-	if (sdbox_read_header(mbox, &hdr, TRUE, &need_resize) < 0)
+	if (sdbox_read_header(mbox, &hdr, TRUE, &need_resize) < 0) {
 		memset(&hdr, 0, sizeof(hdr));
+		need_resize = TRUE;
+	}
 
 	new_hdr = hdr;
 


More information about the dovecot-cvs mailing list