From: Timo Sirainen Date: Sun, 24 Aug 2003 05:57:43 +0000 (+0300) Subject: Assert -> mark cache corrupted X-Git-Tag: 1.1.alpha1~4389 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=203560029e3ad8687c2c759e6a81ecdb8b37ebe6;p=thirdparty%2Fdovecot%2Fcore.git Assert -> mark cache corrupted --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/index-mail-headers.c b/src/lib-storage/index/index-mail-headers.c index 7717889312..24f71134b2 100644 --- a/src/lib-storage/index/index-mail-headers.c +++ b/src/lib-storage/index/index-mail-headers.c @@ -407,7 +407,12 @@ static int parse_cached_headers(struct index_mail *mail, int idx) idx_headers = mail_cache_get_header_fields(mail->ibox->index->cache, idx); - i_assert(idx_headers != NULL); + if (idx_headers == NULL) { + mail_cache_set_corrupted(mail->ibox->index->cache, + "Headers %d names not found", idx); + t_pop(); + return FALSE; + } index_mail_parse_header_init(mail, idx_headers); message_parse_header(NULL, istream, NULL,