nsxiv98972e9
Fixed segfault caused by FD_ISSET() on negative fd
Reported by Kris Siwiec
+2 −2
2 files changed
| @@ -1,4 +1,4 @@ | |||
| 1 | − | VERSION = 1.1 | |
| 1 | + | VERSION = git-20130402 | |
| 2 | 2 | ||
| 3 | 3 | PREFIX = /usr/local | |
| 4 | 4 | MANPREFIX = $(PREFIX)/share/man | |
| @@ -536,7 +536,7 @@ void run(void) | |||
| 536 | 536 | xfd = MAX(xfd, info.fd); | |
| 537 | 537 | } | |
| 538 | 538 | select(xfd + 1, &fds, 0, 0, to_set ? &timeout : NULL); | |
| 539 | − | if (FD_ISSET(info.fd, &fds)) | |
| 539 | + | if (info.fd != -1 && FD_ISSET(info.fd, &fds)) | |
| 540 | 540 | read_info(); | |
| 541 | 541 | } | |
| 542 | 542 | ||