mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
fuzz: Bump FuzzedDataProvider.h
From fa8401f9bf/compiler-rt/include/fuzzer/FuzzedDataProvider.h
This commit is contained in:
parent
01e5d6b105
commit
fa367422ef
2 changed files with 3 additions and 5 deletions
|
@ -209,7 +209,7 @@ T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
|
||||||
abort();
|
abort();
|
||||||
|
|
||||||
// Use the biggest type possible to hold the range and the result.
|
// 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;
|
uint64_t result = 0;
|
||||||
size_t offset = 0;
|
size_t offset = 0;
|
||||||
|
|
||||||
|
@ -230,7 +230,7 @@ T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
|
||||||
if (range != std::numeric_limits<decltype(range)>::max())
|
if (range != std::numeric_limits<decltype(range)>::max())
|
||||||
result = result % (range + 1);
|
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
|
// 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);
|
return static_cast<TS>(value);
|
||||||
} else {
|
} else {
|
||||||
constexpr auto TS_min = std::numeric_limits<TS>::min();
|
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:*/include/c++/
|
||||||
implicit-integer-sign-change:*/new_allocator.h
|
implicit-integer-sign-change:*/new_allocator.h
|
||||||
implicit-integer-sign-change:crc32c/
|
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-integer-sign-change:minisketch/
|
||||||
implicit-signed-integer-truncation:*/include/c++/
|
implicit-signed-integer-truncation:*/include/c++/
|
||||||
implicit-signed-integer-truncation:leveldb/
|
implicit-signed-integer-truncation:leveldb/
|
||||||
|
|
Loading…
Add table
Reference in a new issue