#if defined( _MSC_VER ) #if !defined( _CRT_SECURE_NO_WARNINGS ) #define _CRT_SECURE_NO_WARNINGS // This test file is not intended to be secure. #endif #endif #include "tinyxml2/tinyxml2.h" #include #include #include #if defined( _MSC_VER ) || defined (WIN32) #include #define WIN32_LEAN_AND_MEAN #include _CrtMemState startMemState; _CrtMemState endMemState; #else #include #include #endif using namespace tinyxml2; using namespace std; // Entry point for LibFuzzer. extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { std::string data_string(reinterpret_cast(data), size); XMLDocument doc; doc.Parse( data_string.c_str() ); return 0; }