aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/encode/json/fuzz/main.cpp
blob: 4f40310e068af81bbcad8c31edf4aca345018177 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <library/cpp/monlib/encode/json/json.h>
#include <library/cpp/monlib/encode/fake/fake.h>

#include <util/generic/strbuf.h>


extern "C" int LLVMFuzzerTestOneInput(const ui8* data, size_t size) {
    auto encoder = NMonitoring::EncoderFake();

    try {
        NMonitoring::DecodeJson({reinterpret_cast<const char*>(data), size}, encoder.Get());
    } catch (...) {
    }

    return 0;
}