man-pages/man-pages-3.32-readdir.patch
Ivana Hutarova Varekova c967177abb resolves: #652869
fix the necessary buffer limit in the man page for readdir_r
2011-01-27 16:14:02 +01:00

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