Fixed recent regression (corruption of binary parts)
authorCarl Worth <cworth@cworth.org>
Tue, 31 May 2011 23:31:43 +0000 (16:31 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:28 +0000 (09:38 -0800)
a9/a9443a73f2ebd90584ed4713ed6fbc3b01e7e9 [new file with mode: 0644]

diff --git a/a9/a9443a73f2ebd90584ed4713ed6fbc3b01e7e9 b/a9/a9443a73f2ebd90584ed4713ed6fbc3b01e7e9
new file mode 100644 (file)
index 0000000..1b034e4
--- /dev/null
@@ -0,0 +1,89 @@
+Return-Path: <cworth@cworth.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 38615429E25\r
+       for <notmuch@notmuchmail.org>; Tue, 31 May 2011 16:31:45 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.01\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.01 tagged_above=-999 required=5\r
+       tests=[T_MIME_NO_TEXT=0.01] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id n0MXhTaZTBUO for <notmuch@notmuchmail.org>;\r
+       Tue, 31 May 2011 16:31:44 -0700 (PDT)\r
+Received: from arlo.cworth.org (arlo.cworth.org [50.43.72.2])\r
+       by olra.theworths.org (Postfix) with ESMTP id A9790431FD0\r
+       for <notmuch@notmuchmail.org>; Tue, 31 May 2011 16:31:44 -0700 (PDT)\r
+Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
+       by arlo.cworth.org (Postfix) with ESMTP id BA5B529A524\r
+       for <notmuch@notmuchmail.org>; Tue, 31 May 2011 16:31:43 -0700 (PDT)\r
+Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
+       id A964225417D; Tue, 31 May 2011 16:31:43 -0700 (PDT)\r
+From: Carl Worth <cworth@cworth.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: Fixed recent regression (corruption of binary parts)\r
+User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1\r
+       (i486-pc-linux-gnu)\r
+Date: Tue, 31 May 2011 16:31:43 -0700\r
+Message-ID: <874o4a1m74.fsf@yoom.home.cworth.org>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 31 May 2011 23:31:45 -0000\r
+\r
+--=-=-=\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+I just fixed a bug that I should at least mention to the list.\r
+\r
+On the notmuch master branch, since May 23, there has been a bug which\r
+could lead to corruption when saving binary attachments from\r
+messages.\r
+\r
+A recent change to share more code internally (to provide "notmuch show\r
+=2D-part" rather than a separate top-level command of "notmuch part\r
+=2D-part") inadvertently passed the part content through a function that\r
+would convert CRLF character pairs to LF and would also potentially\r
+convert to UTF-8, (though only if the part being saved had a non-UTF-8\r
+charset explicitly declared).\r
+\r
+Fortunately, I happened to be sent a large attachment hitting the\r
+CRLF->LF corruption so I was able to find and fix this bug.\r
+\r
+I've just pushed a fix for this (along with a test case). So if you're\r
+running notmuch newer than 0.5, you'll probably want to update to the\r
+latest to avoid the chance of hitting this bug.\r
+\r
+Thanks,\r
+\r
+=2DCarl\r
+\r
+=2D-=20\r
+carl.d.worth@intel.com\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+\r
+iEYEARECAAYFAk3lel8ACgkQ6JDdNq8qSWgjpgCfRX9fJ/m4neW6YgM88AEGBnWo\r
+16EAn2aOmc5CYjHm1LpoBEcaMQGjgYeo\r
+=jVZk\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r