summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorbitblt <bitblt@cvs.openbsd.org>1997-01-21 17:14:43 +0000
committerbitblt <bitblt@cvs.openbsd.org>1997-01-21 17:14:43 +0000
commit459d969f3c6054645114010bbb663bbbe7a72e90 (patch)
tree99e415fb2fc2e7b74387538a816d311c3df70bee /usr.sbin
parent94be95a060db452ca33b04d35029eb2782aa7c7a (diff)
Fixed potential buffer overflow.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/amd/amd/mount_fs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/amd/amd/mount_fs.c b/usr.sbin/amd/amd/mount_fs.c
index dd8661e99a0..3cd9b61f82c 100644
--- a/usr.sbin/amd/amd/mount_fs.c
+++ b/usr.sbin/amd/amd/mount_fs.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)mount_fs.c 8.1 (Berkeley) 6/6/93
- * $Id: mount_fs.c,v 1.2 1996/04/03 14:13:05 dm Exp $
+ * $Id: mount_fs.c,v 1.3 1997/01/21 17:14:42 bitblt Exp $
*/
#include "am.h"
@@ -255,7 +255,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)