Update libraries and make it build on windows.

Still gets some warnings because compilers have changed. But should work.
This commit is contained in:
Sandu Liviu Catalin committed 2025-06-25 22:34:23 +03:00
1 parent 520a5eacc5
commit f2b7499f85
3038 files changed
+251668 -273857

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
add_executable(JSON-parse-fuzzer JsonParse.cpp)
target_link_libraries(JSON-parse-fuzzer PUBLIC Poco::JSON)
set_target_properties(JSON-parse-fuzzer PROPERTIES LINK_FLAGS $ENV{LIB_FUZZING_ENGINE})
+26
View File
@@ -0,0 +1,26 @@
#include "Poco/JSON/Parser.h"
using namespace Poco;
using namespace Poco::JSON;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
std::string json(reinterpret_cast<const char*>(data), size);
Parser parser;
Dynamic::Var result;
try
{
result = parser.parse(json);
}
catch (Exception& e)
{
return 0;
}
catch (const std::exception& e)
{
return 0;
}
return 0;
}