Sha256: 91d63b4d5b982efdb5eb2de90966f704c1f2aff1d59f68d0306ec35824183309

Contents?: true

Size: 1.16 KB

Versions: 12

Compression:

Stored size: 1.16 KB

Contents

#include <msgpack.hpp>

extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  try {
    // NOTE(derwolfe): by default the limits are set at 2^32-1 length. I'm
    // setting these at far smaller values to avoid OOMs
    const int test_limit = 1000;
    msgpack::object_handle unpacked = msgpack::unpack(reinterpret_cast<const char *>(data),
                                                      size,
                                                      nullptr,
                                                      nullptr,
                                                      msgpack::unpack_limit(test_limit,
                                                                            test_limit,
                                                                            test_limit,
                                                                            test_limit,
                                                                            test_limit,
                                                                            test_limit));
    msgpack::sbuffer sbuf;
    msgpack::pack(sbuf, unpacked.get());
  } catch (...) {
  }
  return 0;
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
script_core-0.3.2 ext/enterprise_script_service/msgpack/fuzz/unpack_pack_fuzzer.cpp
script_core-0.3.0 ext/enterprise_script_service/msgpack/fuzz/unpack_pack_fuzzer.cpp
script_core-0.2.7 ext/enterprise_script_service/msgpack/fuzz/unpack_pack_fuzzer.cpp
script_core-0.2.6 ext/enterprise_script_service/msgpack/fuzz/unpack_pack_fuzzer.cpp
script_core-0.2.5 ext/enterprise_script_service/msgpack/fuzz/unpack_pack_fuzzer.cpp
script_core-0.2.4 ext/enterprise_script_service/msgpack/fuzz/unpack_pack_fuzzer.cpp
script_core-0.2.3 ext/enterprise_script_service/msgpack/fuzz/unpack_pack_fuzzer.cpp
script_core-0.2.2 ext/enterprise_script_service/msgpack/fuzz/unpack_pack_fuzzer.cpp
script_core-0.2.1 ext/enterprise_script_service/msgpack/fuzz/unpack_pack_fuzzer.cpp
script_core-0.2.0 ext/enterprise_script_service/msgpack/fuzz/unpack_pack_fuzzer.cpp
script_core-0.1.1 ext/enterprise_script_service/msgpack/fuzz/unpack_pack_fuzzer.cpp
script_core-0.1.0 ext/enterprise_script_service/msgpack/fuzz/unpack_pack_fuzzer.cpp