conform to project norms and naming conventions

This commit is contained in:
Chris Wolfe
2018-04-24 20:04:54 -05:00
parent b02371efe5
commit de59b393c7
3 changed files with 3 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
#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 = 10000;
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));
msgpack::sbuffer sbuf;
msgpack::pack(sbuf, unpacked.get());
} catch (...) {
}
return 0;
}