← Commit list

07b1c6ecc

Denys Vlasenko
Denys Vlasenko
2010-10-24
FAILED Duration: 382s

Subject

umount: do not (ab)use PATH_MAX as mntent buffer size

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/umount.c+1 -4
@@ -39,9 +39,6 @@
# define MS_RELATIME (1 << 21)
#endif
#include "libbb.h"
-#ifndef PATH_MAX
-# define PATH_MAX (4*1024)
-#endif
#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 doForce;
- char *const buf = xmalloc(PATH_MAX * 2 + 128); /* to save stack */
+ char *const buf = xmalloc(4096); /* reducing stack usage */
struct mntent me;
FILE *fp;
char *fstype = NULL;