Skip to content

Commit

Permalink
Add NULL check to _gpgme_key_to_ProfPGPKey
Browse files Browse the repository at this point in the history
Fix #1995

Tested-by: Martin Dosch <[email protected]>
  • Loading branch information
jubalh committed Sep 7, 2024
1 parent 3b19a6a commit 0995b1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pgp/gpg.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,8 @@ p_gpg_import_pubkey(const char* buffer)
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;
}

Expand Down

0 comments on commit 0995b1a

Please sign in to comment.