dovecot-2.2: lib-storage: Don't assert-crash when fetching BINAR...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Nov 28 01:52:42 EET 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/aa8f2e0fcb21
changeset: 15422:aa8f2e0fcb21
user: Timo Sirainen <tss at iki.fi>
date: Wed Nov 28 01:52:32 2012 +0200
description:
lib-storage: Don't assert-crash when fetching BINARY contents for empty body.
diffstat:
src/lib-storage/index/index-mail-binary.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diffs (15 lines):
diff -r aade5fa372a6 -r aa8f2e0fcb21 src/lib-storage/index/index-mail-binary.c
--- a/src/lib-storage/index/index-mail-binary.c Wed Nov 28 01:44:53 2012 +0200
+++ b/src/lib-storage/index/index-mail-binary.c Wed Nov 28 01:52:32 2012 +0200
@@ -162,6 +162,11 @@
ctx->copy_start_offset = part_end_offset;
return 0;
}
+ if (part->body_size.physical_size == 0) {
+ /* no body */
+ ctx->copy_start_offset = part_end_offset;
+ return 0;
+ }
/* single part - write decoded data */
block = array_append_space(&ctx->blocks);
More information about the dovecot-cvs
mailing list