From: Timo Sirainen Date: Mon, 30 Jan 2017 19:28:20 +0000 (+0200) Subject: lib-storage: Add assert to make sure header parsing isn't recursed X-Git-Tag: 2.2.28.rc1~175 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3145333a5bde75c9d5b43c85661046fff2959aeb;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Add assert to make sure header parsing isn't recursed --- diff --git a/src/lib-storage/index/index-mail-headers.c b/src/lib-storage/index/index-mail-headers.c index 9559c83de1..da8ba55c4a 100644 --- a/src/lib-storage/index/index-mail-headers.c +++ b/src/lib-storage/index/index-mail-headers.c @@ -194,6 +194,8 @@ void index_mail_parse_header_init(struct index_mail *mail, const uint8_t *match; unsigned int i, field_idx, match_count; + i_assert(!mail->data.header_parser_initialized); + mail->header_seq = data->seq; if (mail->header_data == NULL) { mail->header_data = buffer_create_dynamic(default_pool, 4096);