Mercurial > dovecot > core-2.2
changeset 16536:07642120b6ea
sdbox: If sdbox header is corrupted, resize it to make sure its size is correct.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 18 Jun 2013 18:54:20 +0300 |
parents | 3683d7bff095 |
children | 8a81c5a1b60f |
files | src/lib-storage/index/dbox-single/sdbox-storage.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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;