diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-10 01:31:19 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-10 01:31:19 +0000 |
commit | b4f608d8e05feab4edc8ce2547ca0dcd72f0fb82 (patch) | |
tree | 161892f6b486c74483acb8af732dd5792f9cad92 /util-linux/umount.c | |
parent | d031b203c7ea7f5fe7ba8dfb16693bc91b3feaea (diff) | |
download | busybox-w32-b4f608d8e05feab4edc8ce2547ca0dcd72f0fb82.tar.gz busybox-w32-b4f608d8e05feab4edc8ce2547ca0dcd72f0fb82.tar.bz2 busybox-w32-b4f608d8e05feab4edc8ce2547ca0dcd72f0fb82.zip |
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 'util-linux/umount.c')
-rw-r--r-- | util-linux/umount.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util-linux/umount.c b/util-linux/umount.c index 17d88b388..7c1b81347 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c | |||
@@ -25,7 +25,7 @@ int umount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | |||
25 | int umount_main(int argc, char **argv) | 25 | int umount_main(int argc, char **argv) |
26 | { | 26 | { |
27 | int doForce; | 27 | int doForce; |
28 | char path[2*PATH_MAX]; | 28 | char path[PATH_MAX + 2]; |
29 | struct mntent me; | 29 | struct mntent me; |
30 | FILE *fp; | 30 | FILE *fp; |
31 | char *fstype = 0; | 31 | char *fstype = 0; |
@@ -89,7 +89,7 @@ int umount_main(int argc, char **argv) | |||
89 | 89 | ||
90 | // Do we already know what to umount this time through the loop? | 90 | // Do we already know what to umount this time through the loop? |
91 | if (m) | 91 | if (m) |
92 | safe_strncpy(path, m->dir, PATH_MAX); | 92 | safe_strncpy(path, m->dir, sizeof(path)); |
93 | // For umount -a, end of mtab means time to exit. | 93 | // For umount -a, end of mtab means time to exit. |
94 | else if (opt & OPT_ALL) | 94 | else if (opt & OPT_ALL) |
95 | break; | 95 | break; |