dovecot-1.1: Fix to previous optimization: Don't crash if we wan...

dovecot at dovecot.org dovecot at dovecot.org
Sun Mar 30 11:46:51 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/dc9c098a7d26
changeset: 7439:dc9c098a7d26
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Mar 30 11:41:35 2008 +0300
description:
Fix to previous optimization: Don't crash if we want to read older data from
transaction log.

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/lib-index/mail-transaction-log-file.c |    2 +-

diffs (12 lines):

diff -r 65fbb6226141 -r dc9c098a7d26 src/lib-index/mail-transaction-log-file.c
--- a/src/lib-index/mail-transaction-log-file.c	Wed Mar 26 21:30:15 2008 +0200
+++ b/src/lib-index/mail-transaction-log-file.c	Sun Mar 30 11:41:35 2008 +0300
@@ -1065,7 +1065,7 @@ mail_transaction_log_file_map_mmap(struc
 		return 0;
 	}
 
-	if (file->buffer != NULL &&
+	if (file->buffer != NULL && file->buffer_offset <= start_offset &&
 	    (uoff_t)st.st_size == file->buffer_offset + file->buffer->used) {
 		/* we already have the whole file mapped */
 		if ((ret = mail_transaction_log_file_sync(file)) < 0)


More information about the dovecot-cvs mailing list