From a7bbe9c4a3b2090240173e45bebab86e5cba3b4b Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 3 Mar 2015 16:17:51 +0100 Subject: Make sure Exceptions do not use unsafe format strings --- common/rfb/Exception.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'common/rfb/Exception.h') 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 -- cgit v1.2.3