1
0
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:
James Booth 2015-09-01 21:08:23 +01:00
parent 53035f5e4c
commit 4d18c5ff52

View File

@ -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;
}