diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-24 03:00:57 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-24 03:00:57 +0200 |
commit | 07b1c6ecc035c5b4d68db6b676610327bb897418 (patch) | |
tree | 5e40739cc69392eeee3895605d391ad82291331b | |
parent | 1c26e05f300fbf76cf8d06e742fc571e5365fda3 (diff) | |
download | busybox-w32-07b1c6ecc035c5b4d68db6b676610327bb897418.tar.gz busybox-w32-07b1c6ecc035c5b4d68db6b676610327bb897418.tar.bz2 busybox-w32-07b1c6ecc035c5b4d68db6b676610327bb897418.zip |
umount: do not (ab)use PATH_MAX as mntent buffer size
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | util-linux/umount.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/util-linux/umount.c b/util-linux/umount.c index 7ba46eeb0..1b489ba56 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c | |||
@@ -39,9 +39,6 @@ | |||
39 | # define MS_RELATIME (1 << 21) | 39 | # define MS_RELATIME (1 << 21) |
40 | #endif | 40 | #endif |
41 | #include "libbb.h" | 41 | #include "libbb.h" |
42 | #ifndef PATH_MAX | ||
43 | # define PATH_MAX (4*1024) | ||
44 | #endif | ||
45 | 42 | ||
46 | 43 | ||
47 | #if defined(__dietlibc__) | 44 | #if defined(__dietlibc__) |
@@ -73,7 +70,7 @@ int umount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | |||
73 | int umount_main(int argc UNUSED_PARAM, char **argv) | 70 | int umount_main(int argc UNUSED_PARAM, char **argv) |
74 | { | 71 | { |
75 | int doForce; | 72 | int doForce; |
76 | char *const buf = xmalloc(PATH_MAX * 2 + 128); /* to save stack */ | 73 | char *const buf = xmalloc(4096); /* reducing stack usage */ |
77 | struct mntent me; | 74 | struct mntent me; |
78 | FILE *fp; | 75 | FILE *fp; |
79 | char *fstype = NULL; | 76 | char *fstype = NULL; |