aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-02-01 16:08:57 +0100
committerMarcoFalke <falke.marco@gmail.com>2022-02-01 19:40:58 +0100
commitfadcd031390dd4588bbb1c07e5020a7131312050 (patch)
tree3c046f4ac22351710cddf82190e2db58b64d5f8e /src/validation.cpp
parent133f73e86bd7c3114263500be2fb5090dd76b4bc (diff)
Fix unsigned integer overflow in LoadMempool
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index c12dc9e8b6..f2fa1cf8d5 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -4493,7 +4493,8 @@ bool LoadMempool(CTxMemPool& pool, CChainState& active_chainstate, FopenFn mocka
}
uint64_t num;
file >> num;
- while (num--) {
+ while (num) {
+ --num;
CTransactionRef tx;
int64_t nTime;
int64_t nFeeDelta;