aboutsummaryrefslogtreecommitdiffstats
path: root/win/winvnc
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2015-03-03 16:48:58 +0100
committerPierre Ossman <ossman@cendio.se>2015-03-03 16:48:58 +0100
commitcd5c82a655f74b1395f6216d722d6366edb757f0 (patch)
tree9c491dc3dd7ebb88f5c916b68238187f3d23a793 /win/winvnc
parentb0a8047bba02b10b687048f7191824e010ec38da (diff)
downloadtigervnc-cd5c82a655f74b1395f6216d722d6366edb757f0.tar.gz
tigervnc-cd5c82a655f74b1395f6216d722d6366edb757f0.zip
Fix unsafe format strings to the logging functions
Diffstat (limited to 'win/winvnc')
-rw-r--r--win/winvnc/ManagedListener.cxx2
-rw-r--r--win/winvnc/VNCServerWin32.cxx4
-rw-r--r--win/winvnc/winvnc.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/win/winvnc/ManagedListener.cxx b/win/winvnc/ManagedListener.cxx
index f2933bb0..e7728bc6 100644
--- a/win/winvnc/ManagedListener.cxx
+++ b/win/winvnc/ManagedListener.cxx
@@ -79,7 +79,7 @@ void ManagedListener::refresh() {
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 b1b9596e..36dbcee1 100644
--- a/win/winvnc/VNCServerWin32.cxx
+++ b/win/winvnc/VNCServerWin32.cxx
@@ -189,10 +189,10 @@ int VNCServerWin32::run() {
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 8fba9dcd..b9068657 100644
--- a/win/winvnc/winvnc.cxx
+++ b/win/winvnc/winvnc.cxx
@@ -87,7 +87,7 @@ static void MsgBoxOrLog(const char* msg, bool isError=false) {
} else {
if (isError) {
try {
- vlog.error(msg);
+ vlog.error("%s", msg);
return;
} catch (...) {
}