From dc414fde33f3ec22a6ae3cf29cfc6bc4a9ddae1a Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Tue, 13 Aug 2019 20:28:51 +0100 Subject: Replace sprintf with snprintf throughout codebase --- lib/Core/ExecutorTimers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Core/ExecutorTimers.cpp b/lib/Core/ExecutorTimers.cpp index 22429221..e1d6684d 100644 --- a/lib/Core/ExecutorTimers.cpp +++ b/lib/Core/ExecutorTimers.cpp @@ -117,7 +117,7 @@ void Executor::processTimers(ExecutionState *current, if (ticks || dumpPTree || dumpStates) { if (dumpPTree) { char name[32]; - sprintf(name, "ptree%08d.dot", (int) stats::instructions); + snprintf(name, sizeof(name), "ptree%08d.dot", (int) stats::instructions); auto os = interpreterHandler->openOutputFile(name); if (os) { processTree->dump(*os); -- cgit 1.4.1