]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
imapc: Don't trust mail stream to have correct CRLFs
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 18 Jun 2018 16:13:30 +0000 (19:13 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 18 Jun 2018 16:13:30 +0000 (19:13 +0300)
commit75ae0b779853b7654430d119720548b132399f3d
treeecf7715b0db94a20c14e82f7a5da93393834b500
parentd1d8792e51c141cdb596acdd3a8020fa86dc66df
imapc: Don't trust mail stream to have correct CRLFs

It's not that expensive to just recalculate them. If they're not correct in
the stream, it can result in e.g. truncated emails due to wrong virtual_size
being used in body_size calculation. The wrong CRLFs can especially happen
if plugins modify the stream in istream_opened() hook.
src/lib-storage/index/imapc/imapc-mail-fetch.c