1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05: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:
Michael Vetter 2024-09-07 12:44:42 +02:00
parent 3b19a6afcd
commit 0995b1a180

View File

@ -860,7 +860,8 @@ out:
static ProfPGPKey*
_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;
}