Index: lib/libc_r/uthread/uthread_close.c =================================================================== RCS file: /big/FreeBSD-CVS/src/lib/libc_r/uthread/uthread_close.c,v retrieving revision 1.15 diff -u -r1.15 uthread_close.c --- lib/libc_r/uthread/uthread_close.c 31 May 2003 05:23:20 -0000 1.15 +++ lib/libc_r/uthread/uthread_close.c 9 Jun 2003 09:18:50 -0000 @@ -49,7 +49,8 @@ struct stat sb; struct fd_table_entry *entry; - if ((fd == _thread_kern_pipe[0]) || (fd == _thread_kern_pipe[1]) || + if ((fd < 0) || (fd >= _thread_dtablesize) || + (fd == _thread_kern_pipe[0]) || (fd == _thread_kern_pipe[1]) || (_thread_fd_table[fd] == NULL)) { /* * Don't allow silly programs to close the kernel pipe