projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f30a41
)
Patch from Kevin Hilman <khilman@equator.com> to fix potential
author
Eric Andersen
<andersen@codepoet.org>
Sat, 13 Apr 2002 13:47:39 +0000
(13:47 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Sat, 13 Apr 2002 13:47:39 +0000
(13:47 -0000)
memory corruption from long pathnames in /etc/fstab.
util-linux/mount.c
patch
|
blob
|
history
diff --git
a/util-linux/mount.c
b/util-linux/mount.c
index 382ad832f78708751e9fcb48a6ae597c0dae8339..79335669d5ee5a6c04105ff010eb16484f627dcb 100644
(file)
--- a/
util-linux/mount.c
+++ b/
util-linux/mount.c
@@
-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);
}