Index: ossp-pkg/pth/pth_high.c RCS File: /v/ossp/cvs/ossp-pkg/pth/pth_high.c,v rcsdiff -q -kk '-r1.87' '-r1.88' -u '/v/ossp/cvs/ossp-pkg/pth/pth_high.c,v' 2>/dev/null --- pth_high.c 2002/10/20 16:19:39 1.87 +++ pth_high.c 2002/10/20 17:49:03 1.88 @@ -258,6 +258,10 @@ pth_implicit_init(); pth_debug2("pth_select_ev: called from thread \"%s\"", pth_current->name); + /* sanity checking */ + if (!pth_util_fd_valid(nfd-1)) + return_errno(-1, EINVAL); + /* first deal with the special situation of a plain microsecond delay */ if (nfd == 0 && rfds == NULL && wfds == NULL && efds == NULL && timeout != NULL) { if (timeout->tv_sec < 0 || timeout->tv_usec < 0)