/src/flatbuffers/tests/fuzzer/flatbuffers_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 | | |
7 | | #include <string> |
8 | | |
9 | | #include "cpp17/generated_cpp17/monster_test_generated.h" |
10 | | |
11 | 11.1k | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
12 | 11.1k | flatbuffers::Verifier verifier(data, size); |
13 | 11.1k | MyGame::Example::VerifyMonsterBuffer(verifier); |
14 | 11.1k | flatbuffers::SizeVerifier size_verifier(data, size); |
15 | 11.1k | MyGame::Example::VerifyMonsterBuffer(size_verifier); |
16 | 11.1k | return 0; |
17 | 11.1k | } |