From 482cbfc4e1299434a6f632fe7f4b4e3704e65e87 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 28 Aug 2013 14:43:16 +0300 Subject: add file access fuzzer. --- src/utils/xml.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/utils/xml.cpp') 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 @@ -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) -- cgit v1.2.3-70-g09d2