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

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

extern "C" int LLVMFuzzerTestOneInput(const ui8* data, size_t size)
{
    const std::string_view example{reinterpret_cast<const char*>(data), size};
    const auto converted = Base32StrictDecode(Base32Encode(example));

    Y_ABORT_UNLESS(example == converted);

    return 0;
}