Author: aurel32
Date: 2010-05-25 15:18:03 +0000 (Tue, 25 May 2010)
New Revision: 4287

Modified:
   glibc-package/branches/eglibc-2.11/debian/changelog
   
glibc-package/branches/eglibc-2.11/debian/patches/kfreebsd/local-readdir_r.diff
Log:
    - Update debian/patches/kfreebsd/local-readdir_r.diff.



Modified: glibc-package/branches/eglibc-2.11/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.11/debian/changelog 2010-05-25 13:53:58 UTC 
(rev 4286)
+++ glibc-package/branches/eglibc-2.11/debian/changelog 2010-05-25 15:18:03 UTC 
(rev 4287)
@@ -42,6 +42,7 @@
     - Remove debian/patches/ia64/cvs-memchr.diff (merged)
     - Remove debian/patches/ia64/submitted-memchr.diff (merged)
     - Remove debian/patches/ia64/submitted-siginfo.diff (merged)
+    - Update debian/patches/kfreebsd/local-readdir_r.diff.
     - Remove debian/patches/locale/cvs-C-first_weekday.diff (merged)
     - Update debian/patches/localedata/first_weekday.diff
     - Update debian/patches/localedata/tailor-iso14651_t1.diff

Modified: 
glibc-package/branches/eglibc-2.11/debian/patches/kfreebsd/local-readdir_r.diff
===================================================================
--- 
glibc-package/branches/eglibc-2.11/debian/patches/kfreebsd/local-readdir_r.diff 
    2010-05-25 13:53:58 UTC (rev 4286)
+++ 
glibc-package/branches/eglibc-2.11/debian/patches/kfreebsd/local-readdir_r.diff 
    2010-05-25 15:18:03 UTC (rev 4287)
@@ -4,17 +4,20 @@
 
 --- a/sysdeps/unix/readdir_r.c
 +++ b/sysdeps/unix/readdir_r.c
-@@ -113,7 +113,35 @@
-   while (dp->d_ino == 0);
+@@ -114,14 +114,32 @@
  
    if (dp != NULL)
--    *result = memcpy (entry, dp, reclen);
-+    {
-+      /* The required size of *entry, according to POSIX, is
-+         offsetof (DIRENT_TYPE, d_name[0]) + NAME_MAX + 1.
-+       We must not write beyond the end of *entry.  On some operating
-+       systems, dp->d_reclen may be larger; in this case, copy only as
-+       many bytes as needed.  Also give an error if d_name is too long.  */
+     {
+-#ifdef GETDENTS_64BIT_ALIGNED
+-      /* The d_reclen value might include padding which is not part of
+-       the DIRENT_TYPE data structure.  */
+-      reclen = MIN (reclen, sizeof (DIRENT_TYPE));
+-#endif
++      /* The required size of *entry, according to POSIX, is
++      offsetof (DIRENT_TYPE, d_name[0]) + NAME_MAX + 1.
++      We must not write beyond the end of *entry.  On some operating
++      systems, dp->d_reclen may be larger; in this case, copy only as
++      many bytes as needed.  Also give an error if d_name is too long.  */
 +#ifdef _DIRENT_HAVE_D_RECLEN
 +      /* DIRENT_TYPE is of variable size, with d_name as its last entry.  */
 +      size_t namelen;
@@ -29,15 +32,15 @@
 +                        offsetof (DIRENT_TYPE, d_name[0]) + namelen + 1);
 +      else
 +      {
-+        errno = EOVERFLOW;
-+        dp = NULL;
-+        *result = NULL;
-+      }
++          errno = EOVERFLOW;
++          dp = NULL;
++          *result = NULL;
++        }
 +#else
 +      /* DIRENT_TYPE is of fixed size.  */
-+      *result = memcpy (entry, dp, reclen);
-+#endif
-+    }
+       *result = memcpy (entry, dp, reclen);
+-#ifdef GETDENTS_64BIT_ALIGNED
+-      entry->d_reclen = reclen;
+ #endif
+     }
    else
-     *result = NULL;
- 


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to