aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/SSecurityPlain.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/rfb/SSecurityPlain.cxx')
-rw-r--r--common/rfb/SSecurityPlain.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/rfb/SSecurityPlain.cxx b/common/rfb/SSecurityPlain.cxx
index ab3a2391..018ca517 100644
--- a/common/rfb/SSecurityPlain.cxx
+++ b/common/rfb/SSecurityPlain.cxx
@@ -45,7 +45,8 @@ StringParameter PasswordValidator::plainUsers
bool PasswordValidator::validUser(const char* username)
{
- CharArray users(plainUsers.getValueStr()), user;
+ CharArray users(strDup(plainUsers.getValueStr().c_str()));
+ CharArray user;
while (users.buf) {
strSplit(users.buf, ',', &user.buf, &users.buf);