diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-01-20 15:48:22 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-01-20 15:48:22 +0000 |
commit | 2d733c424ba21cfa55386e81d668036cc801fc6d (patch) | |
tree | 2b578a8d689c495f9c28c0a63d5c3ed41b1d6e0d /cpukit/libcsupport/src/read.c | |
parent | Removed referencing to network driver since it has not been merged yet. (diff) | |
download | rtems-2d733c424ba21cfa55386e81d668036cc801fc6d.tar.bz2 |
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.
Diffstat (limited to 'cpukit/libcsupport/src/read.c')
-rw-r--r-- | cpukit/libcsupport/src/read.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cpukit/libcsupport/src/read.c b/cpukit/libcsupport/src/read.c index 52f61d9b50..e2866744a4 100644 --- a/cpukit/libcsupport/src/read.c +++ b/cpukit/libcsupport/src/read.c @@ -25,6 +25,7 @@ ssize_t read( rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); + rtems_libio_check_is_open(iop); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); |