Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2931:3fc80d3ae8de HEAD
Don't crash with assert if transaction log was truncated unexpectedly.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 04 Dec 2004 23:57:36 +0200 |
parents | 15e8ea839bf9 |
children | 461bd8486083 |
files | src/lib-index/mail-transaction-log.c |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-transaction-log.c Sat Dec 04 23:56:19 2004 +0200 +++ b/src/lib-index/mail-transaction-log.c Sat Dec 04 23:57:36 2004 +0200 @@ -814,9 +814,8 @@ } if (file->mmap_base != NULL && (uoff_t)st.st_size == file->mmap_size && - file->buffer_offset <= start_offset) { + file->buffer_offset <= start_offset && end_offset == (uoff_t)-1) { /* it's all mmaped already */ - i_assert(end_offset == (uoff_t)-1); if (mail_transaction_log_file_sync(file) < 0) return -1; return 1;