mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Merge #16796: wallet: Fix segfault in CreateWalletFromFile
fa734603b7wallet: Fix segmentation fault in CreateWalletFromFile (MarcoFalke)fab3c34412test: Print both messages on failure in assert_raises_message (MarcoFalke)faa13539d5wallet: Fix documentation around WalletParameterInteraction (MarcoFalke) Pull request description: Comes with a test to aid review. The test should fail without the fix to bitcoind The following `CreateWalletFromFile` issues are fixed: * `walletFile` refers to freed memory and will thus corrupt the debug.log and/or crash the node if read * `WalletParameterInteraction` was moved to `CreateWalletFromFile` and `WalletInit::ParameterInteraction` without updating the documentation ACKs for top commit: promag: ACKfa734603b7. darosior: ACKfa734603b7meshcollider: LGTM, code-read ACKfa734603b7Tree-SHA512: 2aceb63a3f25b90a840cfa08d37f5874aad4eb3df8c2ebf94e2ed18b55809b185e6920bdb345b988bff1fcea5e68a214fe06c361f7da2c01a3cc29e0cc421cb4
This commit is contained in:
@@ -4254,7 +4254,7 @@ bool CWallet::Verify(interfaces::Chain& chain, const WalletLocation& location, b
|
||||
|
||||
std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain& chain, const WalletLocation& location, uint64_t wallet_creation_flags)
|
||||
{
|
||||
const std::string& walletFile = WalletDataFilePath(location.GetPath()).string();
|
||||
const std::string walletFile = WalletDataFilePath(location.GetPath()).string();
|
||||
|
||||
// needed to restore wallet transaction meta data after -zapwallettxes
|
||||
std::vector<CWalletTx> vWtx;
|
||||
|
||||
Reference in New Issue
Block a user