dovecot: Assert-crashfix when extension header was resized.

dovecot at dovecot.org dovecot at dovecot.org
Thu Aug 16 19:29:18 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/7c0268b12001
changeset: 6305:7c0268b12001
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Aug 16 19:29:15 2007 +0300
description:
Assert-crashfix when extension header was resized.

diffstat:

1 file changed, 3 insertions(+), 1 deletion(-)
src/lib-index/mail-index-sync-ext.c |    4 +++-

diffs (15 lines):

diff -r aa00e299dfe6 -r 7c0268b12001 src/lib-index/mail-index-sync-ext.c
--- a/src/lib-index/mail-index-sync-ext.c	Thu Aug 16 19:07:34 2007 +0300
+++ b/src/lib-index/mail-index-sync-ext.c	Thu Aug 16 19:29:15 2007 +0300
@@ -316,8 +316,10 @@ sync_ext_resize(const struct mail_transa
 		ssize_t diff = (ssize_t)new_size - (ssize_t)old_size;
 
 		ext = array_idx_modifiable(&map->extensions, 0);
-		for (i = ext_id + 1; i < count; i++)
+		for (i = ext_id + 1; i < count; i++) {
+			ext[i].ext_offset += diff;
 			ext[i].hdr_offset += diff;
+		}
 	}
 
 	if (old_record_size != u->record_size) {


More information about the dovecot-cvs mailing list