/src/flatbuffers/tests/fuzzer/flexbuffers_verifier_fuzzer.cc
Line | Count | Source |
1 | | // Copyright 2015 The Chromium Authors. All rights reserved. |
2 | | // Use of this source code is governed by a BSD-style license that can be |
3 | | // found in the LICENSE file. |
4 | | #include <stddef.h> |
5 | | #include <stdint.h> |
6 | | #include <string> |
7 | | |
8 | | #include "flatbuffers/flexbuffers.h" |
9 | | |
10 | 10.5k | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
11 | 10.5k | std::vector<uint8_t> reuse_tracker; |
12 | | // Check both with and without reuse tracker paths. |
13 | 10.5k | flexbuffers::VerifyBuffer(data, size, &reuse_tracker); |
14 | | // FIXME: we can't really verify this path, because the fuzzer will |
15 | | // construct buffers that time out. |
16 | | // Add a simple #define to bound the number of steps just for the fuzzer? |
17 | | //flexbuffers::VerifyBuffer(data, size, nullptr); |
18 | 10.5k | return 0; |
19 | 10.5k | } |