[dovecot-cvs] dovecot/src/lib-index mail-transaction-log.c, 1.77, 1.78

cras at dovecot.org cras at dovecot.org
Tue Dec 7 03:02:06 EET 2004


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv15226/lib-index

Modified Files:
	mail-transaction-log.c 
Log Message:
Crashfix for mmap_disable=yes.



Index: mail-transaction-log.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-transaction-log.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- mail-transaction-log.c	5 Dec 2004 04:10:43 -0000	1.77
+++ mail-transaction-log.c	7 Dec 2004 01:02:04 -0000	1.78
@@ -755,8 +755,10 @@
 
 	if (ret == 0) {
 		/* EOF */
-		buffer_set_used_size(file->buffer,
-				     file->sync_offset - file->buffer_offset);
+		if (file->sync_offset > file->buffer_offset) {
+			buffer_set_used_size(file->buffer, file->sync_offset -
+					     file->buffer_offset);
+		}
 		return 1;
 	}
 



More information about the dovecot-cvs mailing list