0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-08 10:31:50 -05:00

assumeutxo: Check deserialized coins for out of range values

This commit is contained in:
Fabian Jahr 2023-10-19 15:49:04 +02:00
parent 66865446a7
commit f6213929c5
No known key found for this signature in database
GPG key ID: F13D1E9D890798CD

View file

@ -5399,6 +5399,11 @@ bool ChainstateManager::PopulateAndValidateSnapshot(
coins_count - coins_left);
return false;
}
if (!MoneyRange(coin.out.nValue)) {
LogPrintf("[snapshot] bad snapshot data after deserializing %d coins - bad tx out value\n",
coins_count - coins_left);
return false;
}
coins_cache.EmplaceCoinInternalDANGER(std::move(outpoint), std::move(coin));