← Commit list

defd998c4

Eric Andersen
Eric Andersen
2002-04-13
FAILED Duration: 4s

Subject

Patch from Kevin Hilman to fix potential memory corruption from long pathnames in /etc/fstab.

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+2 -1
@@ -425,7 +425,8 @@ extern int mount_main(int argc, char **argv)
if (optind < argc) {
/* if device is a filename get its real path */
if (stat(argv[optind], &statbuf) == 0) {
- device = simplify_path(argv[optind]);
+ char *tmp = simplify_path(argv[optind]);
+ safe_strncpy(device, tmp, PATH_MAX);
} else {
safe_strncpy(device, argv[optind], PATH_MAX);
}