diff options
author | runge <runge> | 2004-05-27 17:27:34 +0000 |
---|---|---|
committer | runge <runge> | 2004-05-27 17:27:34 +0000 |
commit | e3c8cddef9c6be8d9e8fdb2dd65d286992b78fc5 (patch) | |
tree | a9b9ecd30ea1880358ff6b40d6ab529fcfe46ea8 /libvncserver/main.c | |
parent | fcf44cf5ae60986712f5adc0a77d7c0abee2e36b (diff) | |
download | libtdevnc-e3c8cddef9c6be8d9e8fdb2dd65d286992b78fc5.tar.gz libtdevnc-e3c8cddef9c6be8d9e8fdb2dd65d286992b78fc5.zip |
x11vnc: view-only plain passwd: -viewpasswd and 2nd line of -passwdfile
Diffstat (limited to 'libvncserver/main.c')
-rw-r--r-- | libvncserver/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libvncserver/main.c b/libvncserver/main.c index 488f09d..3182145 100644 --- a/libvncserver/main.c +++ b/libvncserver/main.c @@ -473,9 +473,11 @@ rfbBool rfbCheckPasswordByList(rfbClientPtr cl,const char* response,int len) int i=0; for(passwds=(char**)cl->screen->rfbAuthPasswdData;*passwds;passwds++,i++) { - vncEncryptBytes(cl->authChallenge, *passwds); + uint8_t auth_tmp[CHALLENGESIZE]; + memcpy((char *)auth_tmp, (char *)cl->authChallenge, CHALLENGESIZE); + vncEncryptBytes(auth_tmp, *passwds); - if (memcmp(cl->authChallenge, response, len) == 0) { + if (memcmp(auth_tmp, response, len) == 0) { if(i>=cl->screen->rfbAuthPasswdFirstViewOnly) cl->viewOnly=TRUE; return(TRUE); |