summaryrefslogtreecommitdiffstats
path: root/rfbserver.c
diff options
context:
space:
mode:
authordscho <dscho>2002-06-13 17:41:40 +0000
committerdscho <dscho>2002-06-13 17:41:40 +0000
commit131ede28a74bb18037f5bfbbe1f9ac8f26546544 (patch)
tree780775dd3bb5c9c5db82e72d49936216bd928f9c /rfbserver.c
parentaf41bea661790da0f47089f387f58ffec2c875ee (diff)
downloadlibvncserver-131ede28a74bb18037f5bfbbe1f9ac8f26546544.zip
libvncserver-131ede28a74bb18037f5bfbbe1f9ac8f26546544.tar.gz
pthread fix
Diffstat (limited to 'rfbserver.c')
-rw-r--r--rfbserver.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/rfbserver.c b/rfbserver.c
index f936ccc..11aeff6 100644
--- a/rfbserver.c
+++ b/rfbserver.c
@@ -448,9 +448,14 @@ rfbProcessClientProtocolVersion(cl)
pv[sz_rfbProtocolVersionMsg] = 0;
if (sscanf(pv,rfbProtocolVersionFormat,&major_,&minor_) != 2) {
- rfbLog("rfbProcessClientProtocolVersion: not a valid RFB client\n");
- rfbCloseClient(cl);
- return;
+ char name[1024];
+ if(sscanf(pv,"RFB %03d.%03d %1024s\n",&major_,&minor_,name) != 3) {
+ rfbLog("rfbProcessClientProtocolVersion: not a valid RFB client\n");
+ rfbCloseClient(cl);
+ return;
+ }
+ free(cl->host);
+ cl->host=strdup(name);
}
rfbLog("Protocol version %d.%d\n", major_, minor_);
OpenPOWER on IntegriCloud