[dovecot-cvs] dovecot/src/lib-index mail-index-transaction.c, 1.40, 1.41

cras at dovecot.org cras at dovecot.org
Sun Jan 16 20:03:30 EET 2005


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

Modified Files:
	mail-index-transaction.c 
Log Message:
crashfix



Index: mail-index-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-transaction.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- mail-index-transaction.c	15 Jan 2005 13:09:27 -0000	1.40
+++ mail-index-transaction.c	16 Jan 2005 18:03:27 -0000	1.41
@@ -794,7 +794,12 @@
 			if (keyword_buf->used == 0) {
 				/* first one */
 				k.start = j;
-				buffer_append(keyword_buf, &k, bitmask_offset);
+			} else if (j < k.start) {
+				buffer_copy(keyword_buf,
+					    bitmask_offset + k.start - j,
+					    keyword_buf, bitmask_offset,
+					    (size_t)-1);
+				k.start = j;
 			}
 			b = buffer_get_space_unsafe(keyword_buf,
 						    bitmask_offset +



More information about the dovecot-cvs mailing list