Page MenuHomePhabricator

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

Authored by majcosta on Mon, Jul 27, 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
Automatic diff as part of commit; lint not applicable.
Unit
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.