summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-03-05 08:19:10 +0000
committerJim Meyering <jim@meyering.net>2003-03-05 08:19:10 +0000
commit60660ec79c169ee93e3fb46a1374b2df877ac175 (patch)
tree51e6d042a6da3a74a763e2ef160e161038216c7e /lib
parentfad0f0f1316d7b66d90ce7b114ab679db7eca1c5 (diff)
downloadcoreutils-60660ec79c169ee93e3fb46a1374b2df877ac175.tar.xz
comments
Diffstat (limited to 'lib')
-rw-r--r--lib/getcwd.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/getcwd.c b/lib/getcwd.c
index 2b1d713ff..b418a76f7 100644
--- a/lib/getcwd.c
+++ b/lib/getcwd.c
@@ -44,11 +44,14 @@ extern int errno;
#define MAX_SAFE_LEN (PATH_MAX - 1 - KLUDGE_POSIX_NAME_MAX - 1)
/* This is a wrapper for getcwd.
- Some implementations (at least GNU libc 2.3.1) return non-NULL
- for a working directory name longer than PATH_MAX, yet the returned
- string is a strict prefix of the desired directory name.
+ Some implementations (at least GNU libc 2.3.1 + linux-2.4.20) return
+ non-NULL for a working directory name longer than PATH_MAX, yet the
+ returned string is a strict prefix of the desired directory name.
Upon such a failure, free the offending string, set errno to
- ENAMETOOLONG, and return NULL. */
+ ENAMETOOLONG, and return NULL.
+
+ I've heard that this is a Linux kernel bug, and that it has
+ been fixed between 2.4.21-pre3 and 2.4.21-pre4. */
char *
rpl_getcwd (char *buf, size_t size)