Skip to content

Commit

Permalink
[backport#13546] wallet: Fix use of uninitialized value bnb_used in C…
Browse files Browse the repository at this point in the history
…Wallet::CreateTransaction(...)

Summary:
wallet: Avoid potential use of unitialized value bnb_used in CWallet::CreateTransaction(...) (practicalswift)

Pull request description:

  Avoid use of uninitialized value `bnb_used` in `CWallet::CreateTransaction(...)`.

bitcoin/bitcoin@a23a7f6

---

Backport of Core [[bitcoin/bitcoin#13546 | PR13546]]

Test Plan:
  ninja check check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D7060
  • Loading branch information
MarcoFalke authored and majcosta committed Jul 28, 2020
1 parent 16ad458 commit a78b85c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3461,6 +3461,8 @@ bool CWallet::CreateTransaction(interfaces::Chain::Lock &locked_chainIn,
return false;
}
}
} else {
bnb_used = false;
}

const Amount nChange = nValueIn - nValueToSelect;
Expand Down

0 comments on commit a78b85c

Please sign in to comment.