diff options
author | Bert Münnich <be.muennich@gmail.com> | 2013-04-02 19:32:59 +0200 |
---|---|---|
committer | Bert Münnich <be.muennich@gmail.com> | 2013-04-02 19:32:59 +0200 |
commit | 98972e98f942fa3d3cd2b8f6a831da0a1f94551f (patch) | |
tree | 5cf114d84978452baf5b4199e8aec97678eaea9a /main.c | |
parent | af69b2a7bbac973c837177de03616460393e28d2 (diff) |
Fixed segfault caused by FD_ISSET() on negative fd
Reported by Kris Siwiec
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -536,7 +536,7 @@ void run(void) xfd = MAX(xfd, info.fd); } select(xfd + 1, &fds, 0, 0, to_set ? &timeout : NULL); - if (FD_ISSET(info.fd, &fds)) + if (info.fd != -1 && FD_ISSET(info.fd, &fds)) read_info(); } |