From f19d6679435b66086d3dd3216acd1d637ca1d4c4 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 30 Apr 2020 08:45:50 -0700 Subject: [PATCH] Bump fuzzer allocation limit --- include/fmt/format.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index c19a6604..a09b3e84 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -700,7 +700,7 @@ class basic_memory_buffer : public internal::buffer { template void basic_memory_buffer::grow(std::size_t size) { #ifdef FMT_FUZZ - if (size > 1000) throw std::runtime_error("fuzz mode - won't grow that much"); + if (size > 5000) throw std::runtime_error("fuzz mode - won't grow that much"); #endif std::size_t old_capacity = this->capacity(); std::size_t new_capacity = old_capacity + old_capacity / 2; @@ -1138,7 +1138,7 @@ template class float_writer { return it; } #ifdef FMT_FUZZ - if (num_zeros > 1000) + if (num_zeros > 5000) throw std::runtime_error("fuzz mode - avoiding excessive cpu use"); #endif it = std::fill_n(it, num_zeros, static_cast('0'));