Page MenuHomePhabricator

[backport#16796] wallet: Fix segfault in CreateWalletFromFile

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



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

Backport of Core PR16796

Test Plan
ninja check check-functional

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

majcosta created this revision.Mon, Jul 27, 20:53
Herald added a reviewer: Restricted Project. · View Herald TranscriptMon, Jul 27, 20:53
majcosta requested review of this revision.Mon, Jul 27, 20:53
Fabien accepted this revision.Mon, Jul 27, 21:43
This revision is now accepted and ready to land.Mon, Jul 27, 21:43
teamcity edited the summary of this revision. (Show Details)Mon, Jul 27, 22:03

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