From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org
Subject: Re: [PATCH] cli/crypto: fix segfault on failed gmime2 crypto context creation
Date: Tue, 17 Oct 2017 14:35:55 -0400 [thread overview]
Message-ID: <87376hvcz8.fsf@fifthhorseman.net> (raw)
In-Reply-To: <20171016154044.14564-1-jani@nikula.org>
[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]
On Mon 2017-10-16 18:40:44 +0300, Jani Nikula wrote:
> Commit 1fdc08d0ffab ("cli/crypto: treat failure to create a crypto
> context as fatal.") started treating crypto context creation failures
> "as fatal", returning NULL from _mime_node_create().
>
> Unfortunately, we do not have NULL checks for _mime_node_create()
> failures. The only caller, mime_node_child(), could check and return
> NULL (as it's documented to do on errors) but none of the several call
> sites have NULL checks either. And none of them really have a trivial
> but feasible and graceful way of recovery.
>
> So while the right thing to do would be to handle NULL returns
> properly all over the place, and we have other scenarios that do
> return NULL from above mentioned functions, the crypto context
> creation failure is something that does seem to show up regularly in
> some scenarios, revert back to the functionality before commit
> 1fdc08d0ffab as an interim fix.
This suggestion seems reasonable to me. Transitioning to GMime 3.0 will
also make this interim fix obsolete.
--dkg
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2017-10-17 19:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 15:40 [PATCH] cli/crypto: fix segfault on failed gmime2 crypto context creation Jani Nikula
2017-10-17 18:35 ` Daniel Kahn Gillmor [this message]
2017-10-18 0:39 ` David Bremner
2017-11-06 1:08 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87376hvcz8.fsf@fifthhorseman.net \
--to=dkg@fifthhorseman.net \
--cc=jani@nikula.org \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).