mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-26 11:32:40 +00:00
[fuzzer] Fix mistakes in the parser and scalar fuzzers. (#6314)
The flatbuffers::Parser::Parse() isn't an idempotent method for schema parsing. This commit removes a wrong for-loop that tried to check the same schema twice.
This commit is contained in:
@@ -234,7 +234,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
const uint8_t flags = data[0];
|
||||
// normalize to ascii alphabet
|
||||
const int extra_rep_number =
|
||||
std::max(5, (data[1] < '0' ? (data[1] - '0') : 0));
|
||||
std::max(5, (data[1] > '0' ? (data[1] - '0') : 0));
|
||||
data += 2;
|
||||
size -= 2; // bypass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user