/src/jsoncons/fuzzers/fuzz_msgpack_decode_bytes_source.cpp
Line | Count | Source |
1 | | #include <jsoncons_ext/msgpack/msgpack.hpp> |
2 | | #include <jsoncons/json.hpp> |
3 | | |
4 | | #include <sstream> |
5 | | #include <vector> |
6 | | #include <utility> |
7 | | #include <ctime> |
8 | | #include <limits> |
9 | | |
10 | | using namespace jsoncons; |
11 | | |
12 | | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) |
13 | 32.6k | { |
14 | 32.6k | try { |
15 | 32.6k | json j2 = msgpack::decode_msgpack<json>(jsoncons::span<const uint8_t>(data, size)); |
16 | 32.6k | } |
17 | 32.6k | catch(const jsoncons::ser_error&) {} |
18 | | |
19 | 32.6k | return 0; |
20 | 32.6k | } |