From: Adam Tkac Date: Mon, 18 May 2009 10:43:21 +0000 (+0000) Subject: [Bugfix] Add correct PlainPasswd constructor to avoid vncpasswd crash. X-Git-Tag: v0.0.91~10 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7e6cb6ab0cde7ef5a305399740a63048b4fce574;p=tigervnc.git [Bugfix] Add correct PlainPasswd constructor to avoid vncpasswd crash. Reference: https://bugzilla.redhat.com/show_bug.cgi?id=499401 git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1_0@3811 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/common/rfb/Password.cxx b/common/rfb/Password.cxx index 9127862d..240c9d4f 100644 --- a/common/rfb/Password.cxx +++ b/common/rfb/Password.cxx @@ -38,6 +38,9 @@ PlainPasswd::PlainPasswd() {} PlainPasswd::PlainPasswd(char* pwd) : CharArray(pwd) { } +PlainPasswd::PlainPasswd(int len) : CharArray(len) { +} + PlainPasswd::PlainPasswd(const ObfuscatedPasswd& obfPwd) : CharArray(9) { if (obfPwd.length < 8) throw rdr::Exception("bad obfuscated password length"); diff --git a/common/rfb/Password.h b/common/rfb/Password.h index ab26903a..e5196ee0 100644 --- a/common/rfb/Password.h +++ b/common/rfb/Password.h @@ -28,6 +28,7 @@ namespace rfb { public: PlainPasswd(); PlainPasswd(char* pwd); + PlainPasswd(int len); PlainPasswd(const ObfuscatedPasswd& obfPwd); ~PlainPasswd(); void replaceBuf(char* b);