From: Timo Sirainen Date: Tue, 27 Dec 2022 11:28:14 +0000 (+0200) Subject: lib-storage: index_mail_get_raw_headers() - Don't use data stack for allocations X-Git-Tag: 2.4.0~3218 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e9c8c2be9cc3d472b03f21959405b7800a9c0d0;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: index_mail_get_raw_headers() - Don't use data stack for allocations For some reason this was changed to data stack allocation in 53712af0e7f357e7279d9ff03831428aae85aa45. It looks accidental, since the change wasn't described in the commit message. This didn't actually cause any problems, since the callers duplicated the allocations from data_pool. --- diff --git a/src/lib-storage/index/index-mail-headers.c b/src/lib-storage/index/index-mail-headers.c index 4c7bcdd8d9..1423c54147 100644 --- a/src/lib-storage/index/index-mail-headers.c +++ b/src/lib-storage/index/index-mail-headers.c @@ -670,7 +670,7 @@ index_mail_get_raw_headers(struct index_mail *mail, const char *field, field_idx = get_header_field_idx(_mail->box, field); - dest = t_str_new(128); + dest = str_new(mail->mail.data_pool, 128); if (mail_cache_lookup_headers(_mail->transaction->cache_view, dest, _mail->seq, &field_idx, 1) <= 0) { /* not in cache / error - first see if it's already parsed */