From: Bernhard Reutner-Fischer Date: Tue, 4 Apr 2006 08:23:59 +0000 (-0000) Subject: - fix one-argument mount in cases where fstab or mtab contain overlapping X-Git-Tag: 1_1_2~3 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7fe9dd5dd701e4933dd2bfc91e43d47a1780a9a5;p=oweals%2Fbusybox.git - fix one-argument mount in cases where fstab or mtab contain overlapping entries. (Such as "mount -o remount,rw /" where you're not on rootfs.). (r14723 from trunk) --- diff --git a/util-linux/mount.c b/util-linux/mount.c index 1b6ff965b..1e4d5aa31 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -477,8 +477,9 @@ int mount_main(int argc, char **argv) // Get next fstab entry - if (!getmntent_r(fstab, mtcur, bb_common_bufsiz1, - sizeof(bb_common_bufsiz1))) + if (!getmntent_r(fstab, mtcur, bb_common_bufsiz1 + + (mtcur==mtpair ? sizeof(bb_common_bufsiz1)/2 : 0), + sizeof(bb_common_bufsiz1)/2)) { // Were we looking for something specific?