summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2012-04-26 09:04:14 +0000
committerPierre Ossman <ossman@cendio.se>2012-04-26 09:04:14 +0000
commitad8609a2ed4e37dfc1a03f529a45bfe685041da5 (patch)
tree2389b74e74b94a6c8b609a3c481b2b1d42360b4f /win
parent8cb45e5e4cd751cd206a2bbea71e6efafcb23540 (diff)
downloadtigervnc-ad8609a2ed4e37dfc1a03f529a45bfe685041da5.tar.gz
tigervnc-ad8609a2ed4e37dfc1a03f529a45bfe685041da5.zip
Fix unsafe usage of the logging functions.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4905 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'win')
-rw-r--r--win/rfb_win32/CleanDesktop.cxx16
-rw-r--r--win/rfb_win32/Clipboard.cxx2
-rw-r--r--win/rfb_win32/DeviceFrameBuffer.cxx2
-rw-r--r--win/rfb_win32/MonitorInfo.cxx4
-rw-r--r--win/rfb_win32/RegConfig.cxx4
-rw-r--r--win/rfb_win32/SDisplay.cxx4
-rw-r--r--win/rfb_win32/SocketManager.cxx6
7 files changed, 19 insertions, 19 deletions
diff --git a/win/rfb_win32/CleanDesktop.cxx b/win/rfb_win32/CleanDesktop.cxx
index 43252f10..52dc6bd7 100644
--- a/win/rfb_win32/CleanDesktop.cxx
+++ b/win/rfb_win32/CleanDesktop.cxx
@@ -178,7 +178,7 @@ void CleanDesktop::disableWallpaper() {
if (ad.enable(false))
restoreActiveDesktop = true;
} catch (rdr::Exception& e) {
- vlog.error(e.str());
+ vlog.error("%s", e.str());
}
// -=- Switch of normal wallpaper and notify apps
@@ -186,7 +186,7 @@ void CleanDesktop::disableWallpaper() {
restoreWallpaper = true;
} catch (rdr::Exception& e) {
- vlog.info(e.str());
+ vlog.info("%s", e.str());
}
}
@@ -203,7 +203,7 @@ void CleanDesktop::enableWallpaper() {
ad.enable(true);
restoreActiveDesktop = false;
} catch (rdr::Exception& e) {
- vlog.error(e.str());
+ vlog.error("%s", e.str());
}
}
@@ -216,7 +216,7 @@ void CleanDesktop::enableWallpaper() {
}
} catch (rdr::Exception& e) {
- vlog.info(e.str());
+ vlog.info("%s", e.str());
}
}
@@ -230,7 +230,7 @@ void CleanDesktop::disablePattern() {
restorePattern = true;
} catch (rdr::Exception& e) {
- vlog.info(e.str());
+ vlog.info("%s", e.str());
}
}
@@ -252,7 +252,7 @@ void CleanDesktop::enablePattern() {
}
} catch (rdr::Exception& e) {
- vlog.info(e.str());
+ vlog.info("%s", e.str());
}
}
@@ -288,7 +288,7 @@ void CleanDesktop::disableEffects() {
restoreEffects = true;
} catch (rdr::Exception& e) {
- vlog.info(e.str());
+ vlog.info("%s", e.str());
}
}
@@ -317,6 +317,6 @@ void CleanDesktop::enableEffects() {
}
} catch (rdr::Exception& e) {
- vlog.info(e.str());
+ vlog.info("%s", e.str());
}
}
diff --git a/win/rfb_win32/Clipboard.cxx b/win/rfb_win32/Clipboard.cxx
index a4c43f04..482519e7 100644
--- a/win/rfb_win32/Clipboard.cxx
+++ b/win/rfb_win32/Clipboard.cxx
@@ -185,7 +185,7 @@ Clipboard::setClipText(const char* text) {
vlog.debug("set clipboard");
} catch (rdr::Exception& e) {
- vlog.debug(e.str());
+ vlog.debug("%s", e.str());
}
// - Close the clipboard
diff --git a/win/rfb_win32/DeviceFrameBuffer.cxx b/win/rfb_win32/DeviceFrameBuffer.cxx
index 921e1fa5..cc9bbcad 100644
--- a/win/rfb_win32/DeviceFrameBuffer.cxx
+++ b/win/rfb_win32/DeviceFrameBuffer.cxx
@@ -276,7 +276,7 @@ void DeviceFrameBuffer::setCursor(HCURSOR hCursor, VNCServer* server)
server->setCursor(cursor.width(), cursor.height(), cursor.hotspot,
cursorBm.data, cursor.mask.buf);
} catch (rdr::Exception& e) {
- vlog.error(e.str());
+ vlog.error("%s", e.str());
}
}
diff --git a/win/rfb_win32/MonitorInfo.cxx b/win/rfb_win32/MonitorInfo.cxx
index 0a5e34fa..c57cd26c 100644
--- a/win/rfb_win32/MonitorInfo.cxx
+++ b/win/rfb_win32/MonitorInfo.cxx
@@ -80,7 +80,7 @@ MonitorInfo::MonitorInfo(HWND window) {
return;
}
} catch (rdr::Exception& e) {
- vlog.error(e.str());
+ vlog.error("%s", e.str());
}
#endif
@@ -106,7 +106,7 @@ MonitorInfo::MonitorInfo(const RECT& r) {
return;
}
} catch (rdr::Exception& e) {
- vlog.error(e.str());
+ vlog.error("%s", e.str());
}
#endif
diff --git a/win/rfb_win32/RegConfig.cxx b/win/rfb_win32/RegConfig.cxx
index 90980c33..30cb3102 100644
--- a/win/rfb_win32/RegConfig.cxx
+++ b/win/rfb_win32/RegConfig.cxx
@@ -48,7 +48,7 @@ bool RegConfig::setKey(const HKEY rootkey, const TCHAR* keyname) {
processEvent(event);
return true;
} catch (rdr::Exception& e) {
- vlog.debug(e.str());
+ vlog.debug("%s", e.str());
return false;
}
}
@@ -65,7 +65,7 @@ void RegConfig::loadRegistryConfig(RegKey& key) {
}
} catch (rdr::SystemException& e) {
if (e.err != 6)
- vlog.error(e.str());
+ vlog.error("%s", e.str());
}
}
diff --git a/win/rfb_win32/SDisplay.cxx b/win/rfb_win32/SDisplay.cxx
index 583b4aba..6d0c924f 100644
--- a/win/rfb_win32/SDisplay.cxx
+++ b/win/rfb_win32/SDisplay.cxx
@@ -185,7 +185,7 @@ void SDisplay::startCore() {
if (tryMethod == 0)
throw rdr::Exception("unable to access desktop");
tryMethod--;
- vlog.error(e.str());
+ vlog.error("%s", e.str());
}
}
vlog.info("Started %s", core->methodName());
@@ -388,7 +388,7 @@ SDisplay::processEvent(HANDLE event) {
try {
core->flushUpdates();
} catch (rdr::Exception& e) {
- vlog.error(e.str());
+ vlog.error("%s", e.str());
restartCore();
return;
}
diff --git a/win/rfb_win32/SocketManager.cxx b/win/rfb_win32/SocketManager.cxx
index 9a0dab4c..d4f1965a 100644
--- a/win/rfb_win32/SocketManager.cxx
+++ b/win/rfb_win32/SocketManager.cxx
@@ -43,7 +43,7 @@ static void requestAddressChangeEvents(network::SocketListener* sock_) {
if (WSAIoctl(sock_->getFd(), SIO_ADDRESS_LIST_CHANGE, 0, 0, 0, 0, &dummy, 0, 0) == SOCKET_ERROR) {
DWORD err = WSAGetLastError();
if (err != WSAEWOULDBLOCK)
- vlog.error("Unable to track address changes", err);
+ vlog.error("Unable to track address changes: 0x%08x", (unsigned)err);
}
}
@@ -70,7 +70,7 @@ void SocketManager::addListener(network::SocketListener* sock_,
if (event)
WSACloseEvent(event);
delete sock_;
- vlog.error(e.str());
+ vlog.error("%s", e.str());
throw;
}
@@ -204,7 +204,7 @@ void SocketManager::processEvent(HANDLE event) {
if (WSAEventSelect(ci.sock->getFd(), event, FD_READ | FD_CLOSE) == SOCKET_ERROR)
throw rdr::SystemException("unable to re-enable WSAEventSelect:%u", WSAGetLastError());
} catch (rdr::Exception& e) {
- vlog.error(e.str());
+ vlog.error("%s", e.str());
remSocket(ci.sock);
}
}