From: Pierre Ossman Date: Fri, 30 Aug 2024 14:09:38 +0000 (+0200) Subject: Only read first password from file X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=49a087e8f8ecafe950a86a71ae6657d6cac8ea77;p=tigervnc.git 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. --- 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");