summaryrefslogtreecommitdiffhomepage
path: root/coreutils
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-11-10 01:31:19 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-11-10 01:31:19 +0000
commitb4f608d8e05feab4edc8ce2547ca0dcd72f0fb82 (patch)
tree161892f6b486c74483acb8af732dd5792f9cad92 /coreutils
parentd031b203c7ea7f5fe7ba8dfb16693bc91b3feaea (diff)
readlink: realpath requires PATH_MAX, bb_common_bufsiz1 can be too small
umount: don't actually need char[2 * PATH_MAX] for realpath
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/readlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/readlink.c b/coreutils/readlink.c
index b6e389a21..1ab94595a 100644
--- a/coreutils/readlink.c
+++ b/coreutils/readlink.c
@@ -8,7 +8,6 @@
*/
#include <getopt.h>
-
#include "libbb.h"
int readlink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
@@ -16,6 +15,7 @@ int readlink_main(int argc, char **argv)
{
char *buf;
char *fname;
+ char pathbuf[PATH_MAX];
USE_FEATURE_READLINK_FOLLOW(
unsigned opt;
@@ -34,7 +34,7 @@ int readlink_main(int argc, char **argv)
logmode = LOGMODE_NONE;
if (opt) {
- buf = realpath(fname, bb_common_bufsiz1);
+ buf = realpath(fname, pathbuf);
} else {
buf = xmalloc_readlink_or_warn(fname);
}