mirror of
https://github.com/luau-lang/luau.git
synced 2024-11-15 14:25:44 +08:00
d01addc625
Co-authored-by: Rodactor <rodactor@roblox.com>
21 lines
538 B
C++
21 lines
538 B
C++
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
#include "Luau/Common.h"
|
|
|
|
#include <stdint.h>
|
|
#include <vector>
|
|
|
|
namespace Luau
|
|
{
|
|
void fuzzFormatString(const char* data, size_t size);
|
|
} // namespace Luau
|
|
|
|
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size)
|
|
{
|
|
// copy data to heap to make sure ASAN can catch out of bounds access
|
|
std::vector<char> str(Data, Data + Size);
|
|
|
|
Luau::fuzzFormatString(str.data(), str.size());
|
|
|
|
return 0;
|
|
}
|