From 49a087e8f8ecafe950a86a71ae6657d6cac8ea77 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. --- vncviewer/UserDialog.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vncviewer/UserDialog.cxx b/vncviewer/UserDialog.cxx index 901503c6..13821a9c 100644 --- a/vncviewer/UserDialog.cxx +++ b/vncviewer/UserDialog.cxx @@ -109,7 +109,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