Replace FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION with fmt-specific macro (#1650)

Signed-off-by: Asra Ali <asraa@google.com>
This commit is contained in:
asraa
2020-04-29 12:12:43 -04:00
committed by GitHub
parent f2ed03b919
commit e2ff910675
5 changed files with 14 additions and 8 deletions

View File

@@ -13,7 +13,7 @@ namespace internal {
template <typename T>
int format_float(char* buf, std::size_t size, const char* format, int precision,
T value) {
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
#ifdef FMT_FUZZ
if (precision > 100000)
throw std::runtime_error(
"fuzz mode - avoid large allocation inside snprintf");