summaryrefslogtreecommitdiffstats
path: root/common/rfb/Exception.h
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2015-03-03 16:17:51 +0100
committerPierre Ossman <ossman@cendio.se>2015-03-03 16:17:51 +0100
commita7bbe9c4a3b2090240173e45bebab86e5cba3b4b (patch)
tree0bdba695d5126806843d24245ff20b3b16f3a27a /common/rfb/Exception.h
parent5b3c5f49b103d45ce11cd7c0319c82b95ee61e58 (diff)
downloadtigervnc-a7bbe9c4a3b2090240173e45bebab86e5cba3b4b.tar.gz
tigervnc-a7bbe9c4a3b2090240173e45bebab86e5cba3b4b.zip
Make sure Exceptions do not use unsafe format strings
Diffstat (limited to 'common/rfb/Exception.h')
-rw-r--r--common/rfb/Exception.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/rfb/Exception.h b/common/rfb/Exception.h
index 7c2cbcaa..5f47fcf2 100644
--- a/common/rfb/Exception.h
+++ b/common/rfb/Exception.h
@@ -24,14 +24,15 @@ namespace rfb {
typedef rdr::Exception Exception;
struct AuthFailureException : public Exception {
AuthFailureException(const char* s="Authentication failure")
- : Exception(s) {}
+ : Exception("%s", s) {}
};
struct AuthCancelledException : public rfb::Exception {
AuthCancelledException(const char* s="Authentication cancelled")
- : Exception(s) {}
+ : Exception("%s", s) {}
};
struct ConnFailedException : public Exception {
- ConnFailedException(const char* s="Connection failed") : Exception(s) {}
+ ConnFailedException(const char* s="Connection failed")
+ : Exception("%s", s) {}
};
}
#endif