umount: do not (ab)use PATH_MAX as mntent buffer size
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
1c26e05f30
commit
07b1c6ecc0
@ -39,9 +39,6 @@
|
|||||||
# define MS_RELATIME (1 << 21)
|
# define MS_RELATIME (1 << 21)
|
||||||
#endif
|
#endif
|
||||||
#include "libbb.h"
|
#include "libbb.h"
|
||||||
#ifndef PATH_MAX
|
|
||||||
# define PATH_MAX (4*1024)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(__dietlibc__)
|
#if defined(__dietlibc__)
|
||||||
@ -73,7 +70,7 @@ int umount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
|||||||
int umount_main(int argc UNUSED_PARAM, char **argv)
|
int umount_main(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
int doForce;
|
int doForce;
|
||||||
char *const buf = xmalloc(PATH_MAX * 2 + 128); /* to save stack */
|
char *const buf = xmalloc(4096); /* reducing stack usage */
|
||||||
struct mntent me;
|
struct mntent me;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
char *fstype = NULL;
|
char *fstype = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user