summaryrefslogtreecommitdiffstats
path: root/usr.sbin/amd
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1997-02-09 04:52:11 +0000
committerimp <imp@FreeBSD.org>1997-02-09 04:52:11 +0000
commit03062e7af3f104a9fc3f25ee7fbf91fe2a58058b (patch)
tree05b4c79e5b706c22c9dc494b244a2f432dceb766 /usr.sbin/amd
parent9b5899c4526067a3af8244f8b8bee1fda233532b (diff)
downloadFreeBSD-src-03062e7af3f104a9fc3f25ee7fbf91fe2a58058b.zip
FreeBSD-src-03062e7af3f104a9fc3f25ee7fbf91fe2a58058b.tar.gz
buffer overflow from OpenBSD:
1.3 bitblit: Fixed potential buffer overflow Obtained from: OpenBSD
Diffstat (limited to 'usr.sbin/amd')
-rw-r--r--usr.sbin/amd/amd/mount_fs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/amd/amd/mount_fs.c b/usr.sbin/amd/amd/mount_fs.c
index 861f875..91dceae 100644
--- a/usr.sbin/amd/amd/mount_fs.c
+++ b/usr.sbin/amd/amd/mount_fs.c
@@ -258,7 +258,8 @@ char *opt;
char *f;
char *o = t;
int l = strlen(opt);
- strcpy(t, mnt->mnt_opts);
+ strncpy(t, mnt->mnt_opts, MNTMAXSTR - 1);
+ t[MNTMAXSTR - 1] = 0;
while (*(f = nextmntopt(&o)))
if (strncmp(opt, f, l) == 0)
OpenPOWER on IntegriCloud