diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-08-30 16:09:38 +0200 |
---|---|---|
committer | Linn Mattsson <linma@cendio.se> | 2024-10-22 12:41:33 +0200 |
commit | e30cc3355ab72b25bc9f81007ad1341286d77c32 (patch) | |
tree | 169b668ff7746d5c38e56dd74c948a29652eee28 | |
parent | cf85f2365eaedc6828071d99105acd5307c65c02 (diff) | |
download | tigervnc-e30cc3355ab72b25bc9f81007ad1341286d77c32.tar.gz tigervnc-e30cc3355ab72b25bc9f81007ad1341286d77c32.zip |
Only read first password from file
Read just the first password and ignore anything else in the password
file. This allows you to reuse a password file from the server that also
includes a view-only password.
This fixes a regression introduced in b99daad.
(cherry picked from commit 49a087e8f8ecafe950a86a71ae6657d6cac8ea77)
-rw-r--r-- | vncviewer/UserDialog.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vncviewer/UserDialog.cxx b/vncviewer/UserDialog.cxx index 7f8b3c8e..5b5fda17 100644 --- a/vncviewer/UserDialog.cxx +++ b/vncviewer/UserDialog.cxx @@ -91,7 +91,7 @@ void UserDialog::getUserPasswd(bool secure, std::string* user, } if (!user && passwordFileName[0]) { - std::vector<uint8_t> obfPwd(256); + std::vector<uint8_t> obfPwd(8); FILE* fp; fp = fopen(passwordFileName, "rb"); |