mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Merge 3f56ef7bef into merged_master (Bitcoin PR bitcoin/bitcoin#22146)
This commit is contained in:
commit
9fc1ba6008
2 changed files with 8 additions and 3 deletions
|
|
@ -5235,6 +5235,14 @@ bool ChainstateManager::PopulateAndValidateSnapshot(
|
|||
coins_count - coins_left);
|
||||
return false;
|
||||
}
|
||||
if (coin.nHeight > base_height ||
|
||||
outpoint.n >= std::numeric_limits<decltype(outpoint.n)>::max() // Avoid integer wrap-around in coinstats.cpp:ApplyHash
|
||||
) {
|
||||
LogPrintf("[snapshot] bad snapshot data after deserializing %d coins\n",
|
||||
coins_count - coins_left);
|
||||
return false;
|
||||
}
|
||||
|
||||
coins_cache.EmplaceCoinInternalDANGER(std::move(outpoint), std::move(coin));
|
||||
|
||||
--coins_left;
|
||||
|
|
|
|||
|
|
@ -34,9 +34,6 @@ unsigned-integer-overflow:crypto/
|
|||
unsigned-integer-overflow:FuzzedDataProvider.h
|
||||
unsigned-integer-overflow:hash.cpp
|
||||
unsigned-integer-overflow:leveldb/
|
||||
# temporary coinstats suppressions (will be removed and fixed in https://github.com/bitcoin/bitcoin/pull/22146)
|
||||
unsigned-integer-overflow:node/coinstats.cpp
|
||||
signed-integer-overflow:node/coinstats.cpp
|
||||
unsigned-integer-overflow:policy/fees.cpp
|
||||
unsigned-integer-overflow:prevector.h
|
||||
unsigned-integer-overflow:pubkey.h
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue