More general fix based on bug report and patch from Ian Lance Taylor

<ian@airs.com> to fix this problem:

    There is a small bug in __rtems_close in c/src/lib/libc/libio.c.  It
    does not check whether the file descriptor it is passed is open.  This
    can cause it to make a null dereference if it is passed a file
    descriptor which is in the valid range but which was not opened, or
    which was already closed.
This commit is contained in:
Joel Sherrill
1999-01-20 15:48:22 +00:00
parent 5f22d0916a
commit 2d733c424b
42 changed files with 126 additions and 6 deletions

View File

@@ -26,6 +26,7 @@ off_t lseek(
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
/*
* If this file descriptor is mapped to an external set of handlers,