From f368c50e3798bb21a309310ab333ce4677124b7e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 8 Aug 2014 00:49:19 +0000 Subject: Don't pass dynamic string as format string to log printf. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5417 a436a847-0d15-0410-975c-d299462d15a1 --- src/Log.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Log.cpp b/src/Log.cpp index 6f8fe841..6b169ec9 100644 --- a/src/Log.cpp +++ b/src/Log.cpp @@ -39,7 +39,7 @@ void Log::error(const std::string& msg) { if (_log) { - _log->printf(_log->handle, _uris.log_Error, msg.c_str()); + _log->printf(_log->handle, _uris.log_Error, "%s", msg.c_str()); } else { std::cerr << ANSI_RED << msg << ANSI_RESET; } @@ -49,7 +49,7 @@ void Log::warn(const std::string& msg) { if (_log) { - _log->printf(_log->handle, _uris.log_Warning, msg.c_str()); + _log->printf(_log->handle, _uris.log_Warning, "%s", msg.c_str()); } else { std::cerr << ANSI_YELLOW << msg << ANSI_RESET; } @@ -59,7 +59,7 @@ void Log::info(const std::string& msg) { if (_log) { - _log->printf(_log->handle, _uris.log_Note, msg.c_str()); + _log->printf(_log->handle, _uris.log_Note, "%s", msg.c_str()); } else { std::cout << msg; } -- cgit v1.2.1