summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sbin/mount/mount.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index debe354..c72570d 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -597,7 +597,7 @@ mountfs(const char *vfstype, const char *spec, const char *name, int flags,
append_arg(&mnt_argv, execname);
mangle(optbuf, &mnt_argv);
if (mountprog != NULL)
- strcpy(execname, mountprog);
+ strlcpy(execname, mountprog, sizeof(execname));
append_arg(&mnt_argv, strdup(spec));
append_arg(&mnt_argv, strdup(name));
@@ -905,8 +905,9 @@ putfsent(struct statfs *ent)
if (strncmp(ent->f_mntfromname, "<below>", 7) == 0 ||
strncmp(ent->f_mntfromname, "<above>", 7) == 0) {
- strcpy(ent->f_mntfromname, (strnstr(ent->f_mntfromname, ":", 8)
- +1));
+ strlcpy(ent->f_mntfromname,
+ (strnstr(ent->f_mntfromname, ":", 8) +1),
+ sizeof(ent->f_mntfromname));
}
l = strlen(ent->f_mntfromname);
OpenPOWER on IntegriCloud