Re: [PATCH] crypto: return NULL cryptoctx if protocol string is empty.
authorJameson Graef Rollins <jrollins@finestructure.net>
Fri, 19 Jul 2013 15:57:52 +0000 (08:57 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:56:03 +0000 (09:56 -0800)
54/e5134aff7d078d64aae5c83e1e90a1c55a9c90 [new file with mode: 0644]

diff --git a/54/e5134aff7d078d64aae5c83e1e90a1c55a9c90 b/54/e5134aff7d078d64aae5c83e1e90a1c55a9c90
new file mode 100644 (file)
index 0000000..d09d06c
--- /dev/null
@@ -0,0 +1,93 @@
+Return-Path: <jrollins@finestructure.net>\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 D4A64431FD0\r
+       for <notmuch@notmuchmail.org>; Fri, 19 Jul 2013 08:58:02 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3] 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 DHGqOlwIPjFf for <notmuch@notmuchmail.org>;\r
+       Fri, 19 Jul 2013 08:57:55 -0700 (PDT)\r
+Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
+       [131.215.239.19])\r
+       by olra.theworths.org (Postfix) with ESMTP id BA490431FC2\r
+       for <notmuch@notmuchmail.org>; Fri, 19 Jul 2013 08:57:55 -0700 (PDT)\r
+Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
+       by fire-doxen-postvirus (Postfix) with ESMTP id 841B12E50FB7\r
+       for <notmuch@notmuchmail.org>; Fri, 19 Jul 2013 08:57:55 -0700 (PDT)\r
+X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new\r
+Received: from finestructure.net (lair.fifthhorseman.net [108.58.6.98])\r
+       (Authenticated sender: jrollins)\r
+       by fire-doxen-submit (Postfix) with ESMTP id C10D02E50F0F\r
+       for <notmuch@notmuchmail.org>; Fri, 19 Jul 2013 08:57:53 -0700 (PDT)\r
+Received: by finestructure.net (Postfix, from userid 1000)\r
+       id BB21E62962; Fri, 19 Jul 2013 08:57:52 -0700 (PDT)\r
+From: Jameson Graef Rollins <jrollins@finestructure.net>\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: Re: [PATCH] crypto: return NULL cryptoctx if protocol string is\r
+ empty.\r
+In-Reply-To: <1374248172-14199-1-git-send-email-jrollins@finestructure.net>\r
+References: <id:51E95500.8000404@fifthhorseman.net>\r
+       <1374248172-14199-1-git-send-email-jrollins@finestructure.net>\r
+User-Agent: Notmuch/0.15.2+219~gbae02cc (http://notmuchmail.org) Emacs/24.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Fri, 19 Jul 2013 08:57:52 -0700\r
+Message-ID: <87mwpi8run.fsf@servo.finestructure.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha256; 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: Fri, 19 Jul 2013 15:58:03 -0000\r
+\r
+--=-=-=\r
+Content-Type: text/plain\r
+\r
+On Fri, Jul 19 2013, Jameson Graef Rollins <jrollins@finestructure.net> wrote:\r
+> Badly formed messages that don't specify a protocol in\r
+> signed/encrypted parts, end up with a protocol of NULL.  strcasecmp in\r
+> notmuch_crypto_get_context then segfaults when trying to check it\r
+> against known protocols.  If the protocol is NULL, just return an\r
+> empty context immediately (with appropriate message.)\r
+\r
+Fixes bug reported in id:87mwpiu4vi.fsf@zancas.localnet\r
+\r
+jamie.\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.12 (GNU/Linux)\r
+\r
+iQIcBAEBCAAGBQJR6WIAAAoJEO00zqvie6q82xIP/jBam1RPZEuWqEgRr6XtZd3L\r
+VWgdoOAurPepe84nfkfjj2YTW5u83e/HHVO17cnZ4ESlX/Ky94CIVikrZ9pXf7KX\r
+1KPOCQIv4yRsVlLphMyJV9mQrC0OGwdlmIs/gOgzwXGcAv+G6jq0kH+OFFWUh5I2\r
+dG5I2DCEmtmGirhH3UERjY/nElJRHh9mQS/h5QnDm06b5swCzu6U0AsHsA9+9nFC\r
+oOvFlCDQVc6TXJneHw5fvinvizfe3LW3X78Qti5HMa2LdHdCy37TD30Ucz6K88a3\r
+vr/OsaiAZZnurRg7pp16SEkNLh7Hf52LUPGJXgouJ0kl2Q7x+DnHvukaUg+KFeBA\r
+FvCi62fnV3v4s2ZuhsKne7Uv7RdPkLY6Ye2HD/PeLYzuXZPkaemZWZV3hdORoD6U\r
+Ljq5Vz0SBMsMoqHkgfwDsgBBL8kbnkiECqrDRR4gmIJSNb34TG4FIkznniLYC4Qf\r
+9/WW/AXc6KfUygDXSPNqtl1z7Iazc6pjQWmcUKDWENkcFKeV9IwyRsVfmPN2MUZJ\r
+FbknwFiwWMxK42K1EN2pDzWVKScZZaLuiG0aietGBLkO2c441PzCxUelqQAuIlbi\r
+lOcUEvmH8qElWYTs3nJ2E9uZX+7/jW2VJ6gUyDng0i18FsWyKlISg5YQNHqje/5c\r
+qPZgo7FjjL6elczqIe8E\r
+=IepC\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r