Fix unsafe format strings to the logging functions
diff --git a/win/winvnc/ManagedListener.cxx b/win/winvnc/ManagedListener.cxx
index f2933bb..e7728bc 100644
--- a/win/winvnc/ManagedListener.cxx
+++ b/win/winvnc/ManagedListener.cxx
@@ -79,7 +79,7 @@
if (port)
sock = new network::TcpListener(NULL, port, localOnly);
} catch (rdr::Exception& e) {
- vlog.error(e.str());
+ vlog.error("%s", e.str());
}
if (sock) {
if (!localOnly)
diff --git a/win/winvnc/VNCServerWin32.cxx b/win/winvnc/VNCServerWin32.cxx
index b1b9596..36dbcee 100644
--- a/win/winvnc/VNCServerWin32.cxx
+++ b/win/winvnc/VNCServerWin32.cxx
@@ -189,10 +189,10 @@
vlog.debug("Server exited cleanly");
} catch (rdr::SystemException &s) {
- vlog.error(s.str());
+ vlog.error("%s", s.str());
result = s.err;
} catch (rdr::Exception &e) {
- vlog.error(e.str());
+ vlog.error("%s", e.str());
}
{ Lock l(runLock);
diff --git a/win/winvnc/winvnc.cxx b/win/winvnc/winvnc.cxx
index 8fba9dc..b906865 100644
--- a/win/winvnc/winvnc.cxx
+++ b/win/winvnc/winvnc.cxx
@@ -87,7 +87,7 @@
} else {
if (isError) {
try {
- vlog.error(msg);
+ vlog.error("%s", msg);
return;
} catch (...) {
}