Bug spotted by Kumar Gala. Hopefully this fixes it...
authorRob Landley <rob@landley.net>
Sat, 1 Apr 2006 17:32:52 +0000 (17:32 -0000)
committerRob Landley <rob@landley.net>
Sat, 1 Apr 2006 17:32:52 +0000 (17:32 -0000)
util-linux/mount.c

index fbb4e36c4f9a9c7252650f7fd46a0b5bce9f77ca..42d0eb223767f09c139ff2dc5ef08a94770be4fe 100644 (file)
@@ -475,8 +475,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?