dovecot-2.2: lib-index: Transaction log creation crashed if requ...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Sep 25 17:42:07 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/d2dd659b4a4a
changeset: 15097:d2dd659b4a4a
user: Timo Sirainen <tss at iki.fi>
date: Tue Sep 25 17:41:58 2012 +0300
description:
lib-index: Transaction log creation crashed if required extension name length wasn't divisible by 4.
diffstat:
src/lib-index/mail-transaction-log-file.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (12 lines):
diff -r cc7650515b40 -r d2dd659b4a4a src/lib-index/mail-transaction-log-file.c
--- a/src/lib-index/mail-transaction-log-file.c Tue Sep 25 17:37:55 2012 +0300
+++ b/src/lib-index/mail-transaction-log-file.c Tue Sep 25 17:41:58 2012 +0300
@@ -609,6 +609,8 @@
intro->record_align = rext->record_align;
intro->name_size = strlen(rext->name);
buffer_append(buf, rext->name, intro->name_size);
+ if (buf->used % 4 != 0)
+ buffer_append_zero(buf, 4 - buf->used % 4);
hdr = buffer_get_space_unsafe(buf, hdr_offset, sizeof(*hdr));
hdr->size = mail_index_uint32_to_offset(buf->used - hdr_offset);
More information about the dovecot-cvs
mailing list