Line | Count | Source |
1 | | #if defined( _MSC_VER ) |
2 | | #if !defined( _CRT_SECURE_NO_WARNINGS ) |
3 | | #define _CRT_SECURE_NO_WARNINGS // This test file is not intended to be secure. |
4 | | #endif |
5 | | #endif |
6 | | |
7 | | #include "tinyxml2/tinyxml2.h" |
8 | | #include <string> |
9 | | #include <stddef.h> |
10 | | #include <stdint.h> |
11 | | |
12 | | #if defined( _MSC_VER ) || defined (WIN32) |
13 | | #include <crtdbg.h> |
14 | | #define WIN32_LEAN_AND_MEAN |
15 | | #include <windows.h> |
16 | | _CrtMemState startMemState; |
17 | | _CrtMemState endMemState; |
18 | | #else |
19 | | #include <sys/stat.h> |
20 | | #include <sys/types.h> |
21 | | #endif |
22 | | |
23 | | using namespace tinyxml2; |
24 | | using namespace std; |
25 | | |
26 | | // Entry point for LibFuzzer. |
27 | 2.42k | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { |
28 | 2.42k | std::string data_string(reinterpret_cast<const char*>(data), size); |
29 | 2.42k | XMLDocument doc; |
30 | 2.42k | doc.Parse( data_string.c_str() ); |
31 | | |
32 | 2.42k | return 0; |
33 | 2.42k | } |