From: Josef 'Jeff' Sipek Date: Thu, 6 Sep 2018 15:06:17 +0000 (-0400) Subject: lib-storage: Don't try to process header if we haven't parsed the body structure X-Git-Tag: 2.3.4~192 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc6904ecf48e0af50de9f7446f8644d536db387f;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Don't try to process header if we haven't parsed the body structure Fixes: Panic: file index-mail-headers.c: line 294 (index_mail_parse_header): assertion failed: (part != NULL) --- diff --git a/src/lib-storage/index/index-mail-headers.c b/src/lib-storage/index/index-mail-headers.c index 04c6a7a2a8..0fb66a0c44 100644 --- a/src/lib-storage/index/index-mail-headers.c +++ b/src/lib-storage/index/index-mail-headers.c @@ -290,7 +290,8 @@ void index_mail_parse_header(struct message_part *part, data->parse_line_num++; - if (data->save_bodystructure_header) { + if (data->save_bodystructure_header && + !data->parsed_bodystructure_header) { i_assert(part != NULL); message_part_data_parse_from_header(mail->mail.data_pool, part, hdr); }