summaryrefslogtreecommitdiff
path: root/src/utils/xml.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-28 14:43:16 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-29 00:18:56 +0300
commit482cbfc4e1299434a6f632fe7f4b4e3704e65e87 (patch)
treea629b12b8a768f8431de0c134990bdbaf98912b3 /src/utils/xml.cpp
parent72cc5d13430dff4e41c77482eebd9e5e421fe739 (diff)
downloadmanaplus-482cbfc4e1299434a6f632fe7f4b4e3704e65e87.tar.gz
manaplus-482cbfc4e1299434a6f632fe7f4b4e3704e65e87.tar.bz2
manaplus-482cbfc4e1299434a6f632fe7f4b4e3704e65e87.tar.xz
manaplus-482cbfc4e1299434a6f632fe7f4b4e3704e65e87.zip
add file access fuzzer.
Diffstat (limited to 'src/utils/xml.cpp')
-rw-r--r--src/utils/xml.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp
index 8e0b03e1e..d19c466d1 100644
--- a/src/utils/xml.cpp
+++ b/src/utils/xml.cpp
@@ -26,6 +26,8 @@
#include "resources/resourcemanager.h"
+#include "utils/fuzzer.h"
+
#include "utils/translation/podict.h"
#include <iostream>
@@ -44,6 +46,10 @@ namespace XML
Document::Document(const std::string &filename, const bool useResman) :
mDoc(nullptr)
{
+#ifdef USE_FUZZER
+ if (Fuzzer::conditionTerminate(filename.c_str()))
+ return;
+#endif
int size = 0;
char *data = nullptr;
if (useResman)