aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/encode/json/fuzz/main.cpp
blob: 65f98d8a8b449a37013386829d06d062bda45055 (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;
}