From e30cc3355ab72b25bc9f81007ad1341286d77c32 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 30 Aug 2024 16:09:38 +0200 Subject: [PATCH] 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) --- vncviewer/UserDialog.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 obfPwd(256); + std::vector obfPwd(8); FILE* fp; fp = fopen(passwordFileName, "rb"); -- 2.39.5