Fixed recent regression (corruption of binary parts)

Subject: Fixed recent regression (corruption of binary parts)

Date: Tue, 31 May 2011 16:31:43 -0700

To: notmuch@notmuchmail.org

Cc:

From: Carl Worth


I just fixed a bug that I should at least mention to the list.

On the notmuch master branch, since May 23, there has been a bug which
could lead to corruption when saving binary attachments from
messages.

A recent change to share more code internally (to provide "notmuch show
--part" rather than a separate top-level command of "notmuch part
--part") inadvertently passed the part content through a function that
would convert CRLF character pairs to LF and would also potentially
convert to UTF-8, (though only if the part being saved had a non-UTF-8
charset explicitly declared).

Fortunately, I happened to be sent a large attachment hitting the
CRLF->LF corruption so I was able to find and fix this bug.

I've just pushed a fix for this (along with a test case). So if you're
running notmuch newer than 0.5, you'll probably want to update to the
latest to avoid the chance of hitting this bug.

Thanks,

-Carl

-- 
carl.d.worth@intel.com
part-000.sig (application/pgp-signature)

Thread: