[dovecot-cvs] dovecot/src/lib-index mail-cache-transaction.c, 1.37, 1.38

cras at dovecot.org cras at dovecot.org
Thu Feb 10 00:28:21 EET 2005


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

Modified Files:
	mail-cache-transaction.c 
Log Message:
cache growing crashfix



Index: mail-cache-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-cache-transaction.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- mail-cache-transaction.c	4 Feb 2005 21:34:57 -0000	1.37
+++ mail-cache-transaction.c	9 Feb 2005 22:28:19 -0000	1.38
@@ -249,8 +249,8 @@
 		do {
 			i_assert(size >= 2);
 			size -= 2;
-		} while (buf[size] != ctx->reserved_space_offset);
-		buf[size+1] = ctx->reserved_space;
+		} while (buf[size] + buf[size+1] != hdr->used_file_size);
+		buf[size+1] += ctx->reserved_space;
 	} else {
 		ctx->reserved_space_offset = hdr->used_file_size;
 		ctx->reserved_space = block_size;



More information about the dovecot-cvs mailing list