浏览代码

Fixed segfault caused by FD_ISSET() on negative fd

Reported by Kris Siwiec
master
Bert Münnich 12 年前
父节点
当前提交
98972e98f9
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. +1
    -1
      Makefile
  2. +1
    -1
      main.c

+ 1
- 1
Makefile 查看文件

@@ -1,4 +1,4 @@
VERSION = 1.1
VERSION = git-20130402

PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man


+ 1
- 1
main.c 查看文件

@@ -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();
}



||||||
x
 
000:0
正在加载...
取消
保存