dovecot: If log offsets are broken, don't assert-crash.

dovecot at dovecot.org dovecot at dovecot.org
Wed Jun 20 01:56:47 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/b6cf05796f6d
changeset: 5786:b6cf05796f6d
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jun 20 01:56:39 2007 +0300
description:
If log offsets are broken, don't assert-crash.

diffstat:

1 file changed, 3 insertions(+)
src/lib-index/mail-transaction-log-file.c |    3 +++

diffs (13 lines):

diff -r bcf58c66a099 -r b6cf05796f6d src/lib-index/mail-transaction-log-file.c
--- a/src/lib-index/mail-transaction-log-file.c	Wed Jun 20 01:54:42 2007 +0300
+++ b/src/lib-index/mail-transaction-log-file.c	Wed Jun 20 01:56:39 2007 +0300
@@ -884,6 +884,9 @@ int mail_transaction_log_file_map(struct
 	if (index->log_locked && file == file->log->head &&
 	    end_offset == (uoff_t)-1) {
 		/* we're not interested of going further than sync_offset */
+		if (log_file_map_check_offsets(file, start_offset,
+					       end_offset) == 0)
+			return 0;
 		i_assert(start_offset <= file->sync_offset);
 		end_offset = file->sync_offset;
 	}


More information about the dovecot-cvs mailing list