aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/string_utils/base64/fuzz/lib/main.cpp
blob: 3367f44cf4e55de5aa1015399234ff5e96ebd7a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <library/cpp/string_utils/base64/base64.h>

#include <util/system/types.h>
#include <util/system/yassert.h>

extern "C" int LLVMFuzzerTestOneInput(const ui8* data, size_t size) {
    const TStringBuf example{reinterpret_cast<const char*>(data), size};
    const auto converted = Base64Decode(Base64Encode(example));

    Y_ABORT_UNLESS(example == converted);

    return 0;
}