From 5344a5e098f6240d6017c005b79af18d987df4d7 Mon Sep 17 00:00:00 2001 From: PKEuS Date: Fri, 18 Nov 2016 21:09:41 +0100 Subject: [PATCH] Fixed race condition by properly constructing a local CheckUnusedFunctions instance in CppCheck::processFile(). Instantiating Checks is dangerous! --- lib/cppcheck.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index fc7735a43..16c497d94 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -122,7 +122,7 @@ unsigned int CppCheck::processFile(const std::string& filename, const std::strin } } - CheckUnusedFunctions checkUnusedFunctions; + CheckUnusedFunctions checkUnusedFunctions(0,0,0); bool internalErrorFound(false); try {