From fadcd031390dd4588bbb1c07e5020a7131312050 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 1 Feb 2022 16:08:57 +0100 Subject: [PATCH] Fix unsigned integer overflow in LoadMempool --- src/validation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;