← Commit list

c6450c974

Denys Vlasenko
Denys Vlasenko
2011-02-28
FAILED Duration: 230s

Subject

mount: strip multiple trailing slashes, not just one

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/mount.c+1 -1
@@ -565,7 +565,7 @@ static int mount_it_now(struct mntent *mp, long vfsflags, char *filteropts)
// Remove trailing / (if any) from directory we mounted on
i = strlen(mp->mnt_dir) - 1;
while (i > 0 && mp->mnt_dir[i] == '/')
- mp->mnt_dir[i] = '\0';
+ mp->mnt_dir[i--] = '\0';
// Convert to canonical pathnames as needed
mp->mnt_dir = bb_simplify_path(mp->mnt_dir);