Skip to content

Commit 7b463f7

Browse files
committed
libvncclient/sockets: check client->sock before another FD_ISSET
1 parent 6194ae4 commit 7b463f7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/libvncclient/sockets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ int WaitForMessage(rfbClient* client,unsigned int usecs)
10041004
return num;
10051005
}
10061006

1007-
if(FD_ISSET(client->sock, &fds))
1007+
if(client->sock != RFB_INVALID_SOCKET && FD_ISSET(client->sock, &fds))
10081008
client->serverMsg = TRUE;
10091009
if(client->multicastSock >= 0 && FD_ISSET(client->multicastSock, &fds))
10101010
client->serverMsgMulticast = TRUE;

0 commit comments

Comments
 (0)