19 lines
542 B
C++
19 lines
542 B
C++
#include "evo/core/random.hpp"
|
|
#include <array>
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
extern "C" int LLVMFuzzerTestOneInput(const std::uint8_t*, std::size_t);
|
|
int main() {
|
|
std::array<std::uint8_t, 96> bytes{};
|
|
evo::Random random{123456};
|
|
for (std::size_t sample = 0; sample < 128; ++sample) {
|
|
for (auto& byte : bytes) {
|
|
byte = static_cast<std::uint8_t>(random.next() & 255U);
|
|
}
|
|
if (LLVMFuzzerTestOneInput(bytes.data(), sample % 97) != 0) {
|
|
return 1;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|