aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/SSecurityPlain.h
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2023-01-15 14:41:47 +0100
committerPierre Ossman <ossman@cendio.se>2023-02-04 14:03:13 +0100
commitd608a30d576ed74f7dc7374c1f00d2303fee27f6 (patch)
treea6637dee5800ee1f9af6331d3df02d84afe45d9a /common/rfb/SSecurityPlain.h
parentef8c84eb752e1b59ef824cedeb156b2d64fefe37 (diff)
downloadtigervnc-d608a30d576ed74f7dc7374c1f00d2303fee27f6.tar.gz
tigervnc-d608a30d576ed74f7dc7374c1f00d2303fee27f6.zip
Use fixed size character buffer
We know the needed space here, so let's keep it simple with a constant size string buffer.
Diffstat (limited to 'common/rfb/SSecurityPlain.h')
-rw-r--r--common/rfb/SSecurityPlain.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/common/rfb/SSecurityPlain.h b/common/rfb/SSecurityPlain.h
index 1a81adda..4ca72781 100644
--- a/common/rfb/SSecurityPlain.h
+++ b/common/rfb/SSecurityPlain.h
@@ -23,7 +23,6 @@
#include <rfb/SConnection.h>
#include <rfb/SSecurity.h>
#include <rfb/SSecurityVeNCrypt.h>
-#include <rfb/util.h>
#include <rfb/Configuration.h>
namespace rfb {
@@ -46,17 +45,14 @@ namespace rfb {
SSecurityPlain(SConnection* sc);
virtual bool processMsg();
virtual int getType() const { return secTypePlain; };
- virtual const char* getUserName() const { return username.buf; }
+ virtual const char* getUserName() const { return username; }
virtual ~SSecurityPlain() { }
private:
PasswordValidator* valid;
unsigned int ulen, plen, state;
- CharArray username;
-
- static const unsigned int MaxSaneUsernameLength = 1024;
- static const unsigned int MaxSanePasswordLength = 1024;
+ char username[1024];
};
}