diff options
author | Pierre Ossman <ossman@cendio.se> | 2016-10-05 14:44:24 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2016-10-05 14:44:24 +0200 |
commit | 3c9012b56d71a6eebd3608406d32d977d08d603b (patch) | |
tree | 017ef360a9161080a7b328ff69552d0e2b029a77 /unix | |
parent | b192107b302098864358cd54b6323129c23e271e (diff) | |
download | tigervnc-3c9012b56d71a6eebd3608406d32d977d08d603b.tar.gz tigervnc-3c9012b56d71a6eebd3608406d32d977d08d603b.zip |
Handle select() errors
Diffstat (limited to 'unix')
-rw-r--r-- | unix/xserver/hw/vnc/vncBlockHandler.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/unix/xserver/hw/vnc/vncBlockHandler.c b/unix/xserver/hw/vnc/vncBlockHandler.c index 604dc4ab..390a9b3c 100644 --- a/unix/xserver/hw/vnc/vncBlockHandler.c +++ b/unix/xserver/hw/vnc/vncBlockHandler.c @@ -191,6 +191,9 @@ static void vncWakeupHandler(void * data, int nfds, void * readmask) static struct vncFdEntry* entry; + if (nfds <= 0) + return; + entry = fdsHead; while (entry) { if (entry->read && FD_ISSET(entry->fd, fds)) @@ -231,6 +234,9 @@ void vncWriteWakeupHandler(int nfds, fd_set *fds) { static struct vncFdEntry* entry; + if (nfds <= 0) + return; + entry = fdsHead; while (entry) { if (entry->write && FD_ISSET(entry->fd, fds)) |