mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
Merge bitcoin/bitcoin#24227: Fix unsigned integer overflow in LoadMempool
fadcd03139
Fix unsigned integer overflow in LoadMempool (MarcoFalke) Pull request description: It doesn't seem ideal to have an integer sanitizer enabled, but then disable it for the whole validation.cpp file. This removes one of the two violations. This should be a refactor. ACKs for top commit: prayank23: Code Review ACKfadcd03139
Tree-SHA512: 9fb2f3d49008a59cd45b7c17be0c88c04e61183197c11c8176865af5532c8d0c940db49a351dd0fc75e1d7fd8678c3b816d34cfca170dc6b9cf8f37fdf1c8cae
This commit is contained in:
commit
f7a36477a6
1 changed files with 2 additions and 1 deletions
|
@ -4493,7 +4493,8 @@ bool LoadMempool(CTxMemPool& pool, CChainState& active_chainstate, FopenFn mocka
|
||||||
}
|
}
|
||||||
uint64_t num;
|
uint64_t num;
|
||||||
file >> num;
|
file >> num;
|
||||||
while (num--) {
|
while (num) {
|
||||||
|
--num;
|
||||||
CTransactionRef tx;
|
CTransactionRef tx;
|
||||||
int64_t nTime;
|
int64_t nTime;
|
||||||
int64_t nFeeDelta;
|
int64_t nFeeDelta;
|
||||||
|
|
Loading…
Add table
Reference in a new issue