[Dovecot] Embedded "From<space>" Lines
Timo Sirainen
tss at iki.fi
Wed Oct 29 20:02:41 EET 2008
On Mon, 2008-10-27 at 14:29 -0700, Lennart Lövstrand wrote:
> However, I also noted that there's a case which the fix doesn't cover,
> and that's where the "From<space>" line appears as the first line of
> the body of the message. When this happens, the body_offset will
> point to the blank line between the headers and the body and not the
> actual first line of the body. This will cause the stream to be
> mispositioned at the time of the "From<space>" verification check in
> istream_raw_mbox_get_body_size and the (actually correct)
> expected_body_size will be rejected.
>
> I have enclosed a simple diff that will work around this by adjusting
> the body_offset to point to the next line at the time of call to
> istream_raw_mbox_is_valid_from in istream_raw_mbox_get_body_size.
> This appears to handle the problem correctly in all the test cases I
> have.
Thanks. I fixed it basically the same way but with a bit different code:
http://hg.dovecot.org/dovecot-1.1/rev/9c3fa81a721d
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20081029/fc5e5581/attachment.bin
More information about the dovecot
mailing list