diff options
author | Christian Beier <dontmind@freeshell.org> | 2011-03-17 14:51:34 +0100 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2011-03-17 14:51:34 +0100 |
commit | e92951d19dfba559e4893cd4ad27980e4a8166f8 (patch) | |
tree | bbc4a542e0f5a189b2ba39e632ba18d36a3cf590 | |
parent | fe1ca16e9b75b5f38ab374c8dfff92d2c3ea4532 (diff) | |
download | libvncserver-e92951d19dfba559e4893cd4ad27980e4a8166f8.zip libvncserver-e92951d19dfba559e4893cd4ad27980e4a8166f8.tar.gz |
Remove useless comparisons that always evaluate to false.
There can not be more than 255 security types and MSLogon is
RFB 3.6 only.
-rw-r--r-- | libvncclient/rfbproto.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libvncclient/rfbproto.c b/libvncclient/rfbproto.c index d10e8a6..d424b04 100644 --- a/libvncclient/rfbproto.c +++ b/libvncclient/rfbproto.c @@ -559,11 +559,6 @@ ReadSupportedSecurityType(rfbClient* client, uint32_t *result, rfbBool subAuth) ReadReason(client); return FALSE; } - if (count>sizeof(tAuth)) - { - rfbClientLog("%d security types are too many; maximum is %d\n", count, sizeof(tAuth)); - return FALSE; - } rfbClientLog("We have %d security types to read\n", count); authScheme=0; @@ -573,7 +568,7 @@ ReadSupportedSecurityType(rfbClient* client, uint32_t *result, rfbBool subAuth) if (!ReadFromRFBServer(client, (char *)&tAuth[loop], 1)) return FALSE; rfbClientLog("%d) Received security type %d\n", loop, tAuth[loop]); if (flag) continue; - if (tAuth[loop]==rfbVncAuth || tAuth[loop]==rfbNoAuth || tAuth[loop]==rfbMSLogon || + if (tAuth[loop]==rfbVncAuth || tAuth[loop]==rfbNoAuth || tAuth[loop]==rfbARD || (!subAuth && (tAuth[loop]==rfbTLS || tAuth[loop]==rfbVeNCrypt))) { |