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.3.0.rc1~2196 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=093d5c0cdf04c9190b6377e624206cdf85fe665a;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 63e8d12a9c..af025b56dd 100644 --- a/src/lib-storage/index/index-mail-headers.c +++ b/src/lib-storage/index/index-mail-headers.c @@ -193,6 +193,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);