mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-28 21:12:29 +02:00
Merge bitcoin/bitcoin#28086: fuzz: Bump FuzzedDataProvider.h
fa367422ef
fuzz: Bump FuzzedDataProvider.h (MarcoFalke) Pull request description: Also, remove suppression. ACKs for top commit: dergoegge: utACKfa367422ef
Tree-SHA512: 1d960cbedc4f516ef3dcec05b158164eb9673bcb02793c39d4b345be6d767aded1569289175701bc7382afd00ca41a2409831877f100ab9324969de9045ab6fc
This commit is contained in:
commit
7d8af44356
@ -209,7 +209,7 @@ T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
|
||||
abort();
|
||||
|
||||
// Use the biggest type possible to hold the range and the result.
|
||||
uint64_t range = static_cast<uint64_t>(max) - min;
|
||||
uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
|
||||
uint64_t result = 0;
|
||||
size_t offset = 0;
|
||||
|
||||
@ -230,7 +230,7 @@ T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
|
||||
if (range != std::numeric_limits<decltype(range)>::max())
|
||||
result = result % (range + 1);
|
||||
|
||||
return static_cast<T>(min + result);
|
||||
return static_cast<T>(static_cast<uint64_t>(min) + result);
|
||||
}
|
||||
|
||||
// Returns a floating point value in the range [Type's lowest, Type's max] by
|
||||
@ -390,7 +390,7 @@ TS FuzzedDataProvider::ConvertUnsignedToSigned(TU value) {
|
||||
return static_cast<TS>(value);
|
||||
} else {
|
||||
constexpr auto TS_min = std::numeric_limits<TS>::min();
|
||||
return TS_min + static_cast<char>(value - TS_min);
|
||||
return TS_min + static_cast<TS>(value - TS_min);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,8 +20,6 @@ implicit-integer-sign-change:*/include/boost/
|
||||
implicit-integer-sign-change:*/include/c++/
|
||||
implicit-integer-sign-change:*/new_allocator.h
|
||||
implicit-integer-sign-change:crc32c/
|
||||
# implicit-integer-sign-change in FuzzedDataProvider's ConsumeIntegralInRange
|
||||
implicit-integer-sign-change:FuzzedDataProvider.h
|
||||
implicit-integer-sign-change:minisketch/
|
||||
implicit-signed-integer-truncation:*/include/c++/
|
||||
implicit-signed-integer-truncation:leveldb/
|
||||
|
Loading…
Reference in New Issue
Block a user