File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
test/sanitizer_suppressions Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -4989,6 +4989,14 @@ bool ChainstateManager::PopulateAndValidateSnapshot(
49894989 coins_count - coins_left);
49904990 return false ;
49914991 }
4992+ if (coin.nHeight > base_height ||
4993+ outpoint.n >= std::numeric_limits<decltype (outpoint.n )>::max () // Avoid integer wrap-around in coinstats.cpp:ApplyHash
4994+ ) {
4995+ LogPrintf (" [snapshot] bad snapshot data after deserializing %d coins\n " ,
4996+ coins_count - coins_left);
4997+ return false ;
4998+ }
4999+
49925000 coins_cache.EmplaceCoinInternalDANGER (std::move (outpoint), std::move (coin));
49935001
49945002 --coins_left;
Original file line number Diff line number Diff line change @@ -34,9 +34,6 @@ unsigned-integer-overflow:crypto/
3434unsigned-integer-overflow:FuzzedDataProvider.h
3535unsigned-integer-overflow:hash.cpp
3636unsigned-integer-overflow:leveldb/
37- # temporary coinstats suppressions (will be removed and fixed in https://github.com/bitcoin/bitcoin/pull/22146)
38- unsigned-integer-overflow:node/coinstats.cpp
39- signed-integer-overflow:node/coinstats.cpp
4037unsigned-integer-overflow:policy/fees.cpp
4138unsigned-integer-overflow:prevector.h
4239unsigned-integer-overflow:pubkey.h
You can’t perform that action at this time.
0 commit comments