]> source.dussan.org Git - tigervnc.git/commitdiff
[Bugfix] Add correct PlainPasswd constructor to avoid vncpasswd crash.
authorAdam Tkac <atkac@redhat.com>
Mon, 18 May 2009 10:45:09 +0000 (10:45 +0000)
committerAdam Tkac <atkac@redhat.com>
Mon, 18 May 2009 10:45:09 +0000 (10:45 +0000)
Reference: https://bugzilla.redhat.com/show_bug.cgi?id=499401

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3812 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/rfb/Password.cxx
common/rfb/Password.h

index 9127862d221e1073ae0bf2c9b97cf729558bdf82..240c9d4ffe0d4d475e5f0282319716ef286567e8 100644 (file)
@@ -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");
index ab26903a9ecfa2f7b0d5c283e2d0cc3411bf3620..e5196ee040a79ab7617ff413dcad3ad06f7a9a93 100644 (file)
@@ -28,6 +28,7 @@ namespace rfb {
   public:
     PlainPasswd();
     PlainPasswd(char* pwd);
+    PlainPasswd(int len);
     PlainPasswd(const ObfuscatedPasswd& obfPwd);
     ~PlainPasswd();
     void replaceBuf(char* b);