Page MenuHomePhabricator

[backport#16796] wallet: Fix segfault in CreateWalletFromFile
ClosedPublic

Authored by majcosta on Jul 27 2020, 20:53.

Details

Summary

wallet: Fix segmentation fault in CreateWalletFromFile (MarcoFalke)
test: Print both messages on failure in assert_raises_message (MarcoFalke)
wallet: 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

https://github.com/bitcoin/bitcoin/pull/16796/files


Backport of Core PR16796

Test Plan
ninja check check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jul 27 2020, 21:43

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.