Skip to content

Commit ee11a41

Browse files
Avoid signed integer overflow when loading a mempool.dat file with a malformed time field
1 parent 155bf91 commit ee11a41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5084,7 +5084,7 @@ bool LoadMempool(CTxMemPool& pool)
50845084
pool.PrioritiseTransaction(tx->GetHash(), amountdelta);
50855085
}
50865086
TxValidationState state;
5087-
if (nTime + nExpiryTimeout > nNow) {
5087+
if (nTime > nNow - nExpiryTimeout) {
50885088
LOCK(cs_main);
50895089
AcceptToMemoryPoolWithTime(chainparams, pool, state, tx, nTime,
50905090
nullptr /* plTxnReplaced */, false /* bypass_limits */,

0 commit comments

Comments
 (0)