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