diff options
-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 3ce8fd9a3..26e995494 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 da07d5c00..d3187e603 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 |