diff options
author | Philipp Gesang <philipp.gesang@intra2net.com> | 2018-06-18 11:21:38 +0200 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2018-06-18 19:32:42 +0800 |
commit | df4affd12d35250b8086159acb43702aa6718d86 (patch) | |
tree | 117b8e040452b5c80afb44d3098da09c5b618d26 /crypt-gpgme.c | |
parent | edb4ec84f7078a188ee4c9491405418adf26eb1c (diff) |
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.
Diffstat (limited to 'crypt-gpgme.c')
-rw-r--r-- | crypt-gpgme.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypt-gpgme.c b/crypt-gpgme.c index 700a3630..f2af8986 100644 --- a/crypt-gpgme.c +++ b/crypt-gpgme.c @@ -1382,8 +1382,12 @@ static void print_smime_keyinfo (const char* msg, gpgme_signature_t sig, } else { - state_puts (_("KeyID "), s); - state_puts (sig->fpr, s); + if (sig->fpr == NULL) + state_puts (_("no signature fingerprint available"), s); + else { + state_puts (_("KeyID "), s); + state_puts (sig->fpr, s); + } state_puts ("\n", s); } |