From 0cf8865cf097467e6df0aa6ed47061ad1c1d540a Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 20 Jul 2012 16:55:19 +0000 Subject: readdir: drop bogus code * libc/posix/readdir.c (readdir): Drop bogus attempt to catch bogus pointers. --- newlib/ChangeLog | 5 +++++ 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 + + * libc/posix/readdir.c (readdir): Drop bogus attempt to catch + bogus pointers. + 2012-07-18 Ralf Corsépius * 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 -- cgit v1.2.3