The passwordfile must be opened binary.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@104 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/vncviewer/cview.cxx b/vncviewer/cview.cxx
index fd5d2c5..9406c11 100644
--- a/vncviewer/cview.cxx
+++ b/vncviewer/cview.cxx
@@ -1491,7 +1491,7 @@
 
 bool CView::getUserPasswd(char** user, char** password) {
   if (!user && options.passwordFile.buf[0]) {
-    FILE* fp = fopen(options.passwordFile.buf, "r");
+    FILE* fp = fopen(options.passwordFile.buf, "rb");
     if (!fp) return false;
     char data[256];
     int datalen = fread(data, 1, 256, fp);