]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-mail: Fixed handling duplicate boundary prefixes.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 22 Apr 2016 15:15:44 +0000 (18:15 +0300)
committerGitLab <gitlab@git.dovecot.net>
Fri, 22 Apr 2016 22:43:53 +0000 (01:43 +0300)
commit7a12331c6360968b141a0888e0bf04dd24145f23
treec3cc455b93177db79e5167830ea60948a5245cbd
parent088bfb6b26ee72122f2ed8a632c741b19d8821d7
lib-mail: Fixed handling duplicate boundary prefixes.

If inner MIME part had the same --boundary prefix as its parent(s) and
the MIME part body started with the inner --boundary prefix, we didn't yet
have it in the list of valid boundaries, so we thought that the outer
boundary was found and the MIME headers were truncated. But due to an extra
bug we still treated it as if it were the inner boundary, except the MIME
part sizes/offsets were set wrong.

This for example fixes a situation where FETCH [1.2.MIME] returns an extra
newline before the actual headers.
src/lib-mail/message-parser.c
src/lib-mail/test-message-parser.c