]> dgit.raspbian.org Git - dovecot.git/commit
[PATCH 04/14] lib-mail: message-parser-from-parts: Enforce 50 MB all-headers-max...
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 16 Apr 2026 20:38:02 +0000 (22:38 +0200)
committerNoah Meyerhans <noahm@debian.org>
Wed, 16 Sep 2026 19:06:35 +0000 (15:06 -0400)
commitc0fe328ed9744aba3b0a79f0843aeb9d365268ec
tree464d3f5ff190003d673cc482b1ef511ff71795c0
parentcf0656349a5dd2e9c22349971a6e3fb2094eef2a
[PATCH 04/14] lib-mail: message-parser-from-parts: Enforce 50 MB all-headers-max-size limit

The preparsed (from-parts) header parser was not tracking
all_headers_total_size and never called message_parse_header_lower_limit(),
so the cumulative 50 MB header size limit was never applied when re-parsing
a message using cached part structure.

Fix by mirroring the same tracking that message-parser.c does in its
parse_next_header_block(): update all_headers_total_size for each parsed
header line, and call message_parse_header_lower_limit() with the remaining
budget when initialising the per-part header parser.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Gbp-Pq: Name 0004-lib-mail-message-parser-from-parts-Enforce-50-MB-all.patch
src/lib-mail/message-parser-from-parts.c