mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-30 02:26:21 +00:00
Add NULL check to _gpgme_key_to_ProfPGPKey
Fix https://github.com/profanity-im/profanity/issues/1995 Tested-by: Martin Dosch <martin@mdosch.de>
This commit is contained in:
@@ -860,7 +860,8 @@ out:
|
|||||||
static ProfPGPKey*
|
static ProfPGPKey*
|
||||||
_gpgme_key_to_ProfPGPKey(gpgme_key_t key)
|
_gpgme_key_to_ProfPGPKey(gpgme_key_t key)
|
||||||
{
|
{
|
||||||
if (key == NULL) {
|
if (key == NULL || key->uids == NULL
|
||||||
|
|| key->subkeys == NULL || key->uids->uid == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user