Max Moroz 2017-10-17 08:19:38 -07:00
parent fffae2ee8f
commit 30797e783a
1 changed files with 3 additions and 0 deletions

View File

@ -25,6 +25,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
const std::size_t data_hash = std::hash<std::string>()(data_string);
const int max_option_value = std::numeric_limits<int>::max();
const int random_option_value = data_hash % max_option_value;
// Disable XML_PARSE_HUGE to avoid stack overflow.
random_option_value &= ~XML_PARSE_HUGE;
const int options[] = {0, random_option_value};
for (const auto option_value : options) {