0
0
mirror of https://github.com/zeux/pugixml.git synced 2024-12-27 13:33:17 +08:00
pugixml/tests/fuzz_parse.cpp
Arseny Kapoulkine 15fba1debc tests: Add support for afl-fuzz
With the current setup it successfully finds the (fixed) DOCTYPE buffer overrun
in ~50 minutes (on a single core).
2015-03-13 00:18:30 -07:00

17 lines
377 B
C++

#include "../src/pugixml.hpp"
#include "allocator.hpp"
int main(int argc, const char** argv)
{
pugi::set_memory_management_functions(memory_allocate, memory_deallocate);
pugi::xml_document doc;
for (int i = 1; i < argc; ++i)
{
doc.load_file(argv[i]);
doc.load_file(argv[i], pugi::parse_minimal);
doc.load_file(argv[i], pugi::parse_full);
}
}