diff options
author | Eric Blake <eblake@redhat.com> | 2012-07-20 16:55:19 +0000 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2012-07-20 16:55:19 +0000 |
commit | 0cf8865cf097467e6df0aa6ed47061ad1c1d540a (patch) | |
tree | 0388615c3333dcc2a196daf67129cf9095154819 | |
parent | f20f7e36ad3394458e565f8d6c72f4f65a97c1bb (diff) | |
download | newlib-0cf8865cf097467e6df0aa6ed47061ad1c1d540a.zip newlib-0cf8865cf097467e6df0aa6ed47061ad1c1d540a.tar.gz newlib-0cf8865cf097467e6df0aa6ed47061ad1c1d540a.tar.bz2 |
readdir: drop bogus code
* libc/posix/readdir.c (readdir): Drop bogus attempt to catch
bogus pointers.
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/libc/posix/readdir.c | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 3ce8fd9..26e9954 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2012-07-20 Eric Blake <eblake@redhat.com> + + * libc/posix/readdir.c (readdir): Drop bogus attempt to catch + bogus pointers. + 2012-07-18 Ralf Corsépius <ralf.corsepius@rtems.org> * libc/sys/rtems/machine/_types.h (_ssize_t): Use signed int for diff --git a/newlib/libc/posix/readdir.c b/newlib/libc/posix/readdir.c index da07d5c..d3187e6 100644 --- a/newlib/libc/posix/readdir.c +++ b/newlib/libc/posix/readdir.c @@ -75,12 +75,6 @@ _DEFUN(readdir, (dirp), continue; } dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc); - if ((int)dp & 03) { /* bogus pointer check */ -#ifdef HAVE_DD_LOCK - __lock_release_recursive(dirp->dd_lock); -#endif - return NULL; - } if (dp->d_reclen <= 0 || dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc) { #ifdef HAVE_DD_LOCK |