aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/encode/prometheus/fuzz/main.cpp
blob: a9ed0afc45df37a00d58a0cb8d8c4cdbc301654e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <library/cpp/monlib/encode/prometheus/prometheus.h> 
#include <library/cpp/monlib/encode/fake/fake.h> 
 
#include <util/stream/mem.h> 
 
 
extern "C" int LLVMFuzzerTestOneInput(const ui8* buf, size_t size) { 
    using namespace NMonitoring; 
 
    try { 
        TStringBuf data(reinterpret_cast<const char*>(buf), size); 
        auto encoder = EncoderFake(); 
        DecodePrometheus(data, encoder.Get()); 
    } catch (...) { 
    } 
 
    return 0; 
}