According to http://www.realvnc.com/docs/rfbproto.pdf section 6.2.1,
when handling older clients, SecurityResult should not be sent.
diff --git a/vnc.c b/vnc.c
index 72c8d1c..8ae671a 100644
--- a/vnc.c
+++ b/vnc.c
@@ -1775,7 +1775,10 @@ static int protocol_client_auth(VncState *vs, char
*data, size_t len)
switch (vs->auth) {
case VNC_AUTH_NONE:
VNC_DEBUG("Accept auth none\n");
- vnc_write_u32(vs, 0); /* Accept auth completion */
+ if (vs->minor >= 8) {
+ vnc_write_u32(vs, 0); /* Accept auth completion */
+ vnc_flush(vs);
+ }
vnc_read_when(vs, protocol_client_init, 1);
break;