[fuzzer] Limit parser_fuzzer execution time (#6431)

Limit the length of the fuzzer input to 16384 characters to prevent timeout
in JSON parser (Vector of tables with key).

Related oss-fuzz issues:
- 5742497110294528
This commit is contained in:
Vladimir Glavnyy
2021-01-30 21:43:31 +07:00
committed by GitHub
parent 6d91096a2f
commit 76e7a0ff55
2 changed files with 2 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ static fs::path exe_path_;
namespace {
static constexpr size_t kMinInputLength = 1;
static constexpr size_t kMaxInputLength = 99000;
static constexpr size_t kMaxInputLength = 16384;
static constexpr uint8_t flags_strict_json = 0x80;
static constexpr uint8_t flags_skip_unexpected_fields_in_json = 0x40;

View File

@@ -10,7 +10,7 @@
#include "test_init.h"
static constexpr size_t kMinInputLength = 1;
static constexpr size_t kMaxInputLength = 33000;
static constexpr size_t kMaxInputLength = 16384;
static constexpr uint8_t flags_strict_json = 0x80;
static constexpr uint8_t flags_skip_unexpected_fields_in_json = 0x40;