mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Add robustness against null models
This commit is contained in:
@@ -72,6 +72,8 @@ void AskPassphraseDialog::setModel(WalletModel *model)
|
||||
void AskPassphraseDialog::accept()
|
||||
{
|
||||
std::string oldpass, newpass1, newpass2;
|
||||
if(!model)
|
||||
return;
|
||||
// TODO: mlock memory / munlock on return so they will not be swapped out, really need "mlockedstring" wrapper class to do this safely
|
||||
oldpass.reserve(MAX_PASSPHRASE_SIZE);
|
||||
newpass1.reserve(MAX_PASSPHRASE_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user