mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
PGP: Added null check for passphrase_attempt
This commit is contained in:
parent
53035f5e4c
commit
4d18c5ff52
@ -581,7 +581,9 @@ p_gpg_sign(const char * const str, const char * const fp)
|
||||
gpgme_free(signed_str);
|
||||
}
|
||||
|
||||
passphrase = strdup(passphrase_attempt);
|
||||
if (passphrase_attempt) {
|
||||
passphrase = strdup(passphrase_attempt);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -710,7 +712,9 @@ p_gpg_decrypt(const char * const cipher)
|
||||
}
|
||||
gpgme_free(plain_str);
|
||||
|
||||
passphrase = strdup(passphrase_attempt);
|
||||
if (passphrase_attempt) {
|
||||
passphrase = strdup(passphrase_attempt);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user