From: Philipp Gesang Date: Mon, 18 Jun 2018 09:21:38 +0000 (+0200) Subject: crypt-gpgme: prevent crash on bad S/MIME signature X-Git-Tag: 2019-10-25~671^2~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=23c7bfb6e42b55c8246c988472d4a35b35a34394;p=neomutt crypt-gpgme: prevent crash on bad S/MIME signature Inform the user about the fingerprint being unavailable instead of crashing if the S/MIME signature is bad. --- diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index f05eee90e..a623d5b4c 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -1531,12 +1531,15 @@ static void print_smime_keyinfo(const char *msg, gpgme_signature_t sig, } else { - state_puts(_("KeyID "), s); if (sig->fpr) + { + state_puts(_("KeyID "), s); state_puts(sig->fpr, s); + } else - state_puts(_("Unknown"), s); - + { + state_puts(_("no signature fingerprint available"), s); + } state_puts("\n", s); }