# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../dovecot/dovecot-2.2-0003-b38d5ebacf25.patch # Copyright (C) 2013 The OpenSDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END --- # HG changeset patch # User Timo Sirainen # Date 1366035726 -10800 # Node ID b38d5ebacf25379869b4d5119719f773a26fa077 # Parent fc9ef7d2251aec477d73bacfec82c0f66cc813b3 lib-mail: Don't assert-crash when multipart doesn't actually have any parts. diff -r fc9ef7d2251a -r b38d5ebacf25 src/lib-mail/message-parser.c --- a/src/lib-mail/message-parser.c Sun Apr 14 21:27:29 2013 +0300 +++ b/src/lib-mail/message-parser.c Mon Apr 15 17:22:06 2013 +0300 @@ -839,7 +839,10 @@ } i_stream_skip(ctx->input, offset - ctx->input->v_offset); - if ((ctx->part->flags & MESSAGE_PART_FLAG_MULTIPART) == 0) + /* multipart messages may begin with --boundary--, which makes them + not have any children. */ + if ((ctx->part->flags & MESSAGE_PART_FLAG_MULTIPART) == 0 || + ctx->part->children == NULL) ctx->parse_next_block = preparsed_parse_body_more; else ctx->parse_next_block = preparsed_parse_prologue_more;