c967177abb
fix the necessary buffer limit in the man page for readdir_r
17 lines
529 B
Diff
17 lines
529 B
Diff
diff -up man-pages-3.32/man3/readdir.3.pom man-pages-3.32/man3/readdir.3
|
|
--- man-pages-3.32/man3/readdir.3.pom 2010-12-03 08:02:01.000000000 +0100
|
|
+++ man-pages-3.32/man3/readdir.3 2011-01-27 16:05:54.000000000 +0100
|
|
@@ -226,8 +226,10 @@ as follows:
|
|
.in +4n
|
|
.nf
|
|
|
|
-len = offsetof(struct dirent, d_name) +
|
|
- pathconf(dirpath, _PC_NAME_MAX) + 1
|
|
+len = (offsetof(struct dirent, d_name) +
|
|
+ pathconf(dirpath, _PC_NAME_MAX) + 1 + sizeof(long))
|
|
+ & -sizeof(long);
|
|
+
|
|
entryp = malloc(len);
|
|
|
|
.fi
|