mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 15:16:22 +00:00
PGP: Added null check for passphrase_attempt
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user