mirror of https://github.com/mirror/busybox.git
Patch from Kevin Hilman <khilman@equator.com> to fix potential
memory corruption from long pathnames in /etc/fstab.1_00_stable_10817
parent
1f30a41abe
commit
defd998c42
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue