diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-07-22 08:34:07 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-07-22 08:34:09 -0400 |
commit | e8c74348d397b141adabfda4e2a754c5fb7ce8c9 (patch) | |
tree | 386c0303607566f1a4e3cfbc039353451a81d678 /src/wallet/wallet.cpp | |
parent | eeae4711f338ef2621f2f0295b974dee846cc36f (diff) | |
parent | d06330396f64b9a3a3016afc1f937633b4b322ab (diff) |
Merge #13683: wallet: Introduce assertion to document the assumption that cache and cache_used are always set in tandem
d06330396f wallet: Avoid potential null pointer dereference in CWalletTx::GetAvailableCredit(...) (practicalswift)
Pull request description:
Avoid potential null pointer dereference in `CWalletTx::GetAvailableCredit(...)`.
Introduced in 4279da47855ec776f8d57c6579fe89afc9cbe8c1.
Tree-SHA512: 92d1da9682f0bab11f6f96395ca30549331b0a056cbceb7e1a7f98b3d17d10082aaeed0907cafd46f4164b0e0f4b77e01f78bfd7d24e0503a66c6942ae842aa5
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index aeed430111..d38f943558 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1977,6 +1977,7 @@ CAmount CWalletTx::GetAvailableCredit(bool fUseCache, const isminefilter& filter if (cache) { *cache = nCredit; + assert(cache_used); *cache_used = true; } return nCredit; |