Mercurial > dovecot > original-hg > dovecot-1.2
changeset 7588:ffa9c0dc27a7 HEAD
dbox: Crashfix when using old maildir files.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 02 Jun 2008 18:51:02 +0300 |
parents | 0fad9c4d0146 |
children | f681e55f5c60 |
files | src/lib-storage/index/maildir/maildir-uidlist.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-uidlist.c Mon Jun 02 18:25:15 2008 +0300 +++ b/src/lib-storage/index/maildir/maildir-uidlist.c Mon Jun 02 18:51:02 2008 +0300 @@ -315,8 +315,14 @@ static void maildir_uidlist_update_hdr(struct maildir_uidlist *uidlist, const struct stat *st) { - struct maildir_index_header *mhdr = &uidlist->mbox->maildir_hdr; + struct maildir_index_header *mhdr; + if (uidlist->mbox == NULL) { + /* dbox is using this */ + return; + } + + mhdr = &uidlist->mbox->maildir_hdr; mhdr->uidlist_mtime = st->st_mtime; mhdr->uidlist_mtime_nsecs = ST_MTIME_NSEC(*st); mhdr->uidlist_size = st->st_size;