The password file must be opened in binary mode. Otherwise, you might
get "bad obfuscated password length" errors on Windows.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4586 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/vncviewer/UserDialog.cxx b/vncviewer/UserDialog.cxx
index 0ac5009..0c2559f 100644
--- a/vncviewer/UserDialog.cxx
+++ b/vncviewer/UserDialog.cxx
@@ -65,7 +65,7 @@
ObfuscatedPasswd obfPwd(256);
FILE* fp;
- fp = fopen(passwordFileStr.buf, "r");
+ fp = fopen(passwordFileStr.buf, "rb");
if (!fp)
throw rfb::Exception(_("Opening password file failed"));