summaryrefslogtreecommitdiff
path: root/sys/compat/ultrix
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-06-22 23:52:19 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-06-22 23:52:19 +0000
commit68fe655b77ab978f8d03f8feec46801220bd46c5 (patch)
treecf71e1513645d4dd977c3b1b4a92d6ec1578c8f6 /sys/compat/ultrix
parent5557b30319fbfe74844a640472fa29a826d1be8b (diff)
Replace a whole bunch of scary uses of strncpy() with strlcpy() and
use compat-specific MAXNAMLEN values where appropriate ok millert@, pedro@
Diffstat (limited to 'sys/compat/ultrix')
-rw-r--r--sys/compat/ultrix/ultrix_fs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/compat/ultrix/ultrix_fs.c b/sys/compat/ultrix/ultrix_fs.c
index bd5bcf841ff..d0ee49b5cc2 100644
--- a/sys/compat/ultrix/ultrix_fs.c
+++ b/sys/compat/ultrix/ultrix_fs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ultrix_fs.c,v 1.11 2002/07/20 19:24:57 art Exp $ */
+/* $OpenBSD: ultrix_fs.c,v 1.12 2004/06/22 23:52:18 jfb Exp $ */
/* $NetBSD: ultrix_fs.c,v 1.4 1996/04/07 17:23:06 jonathan Exp $ */
/*
@@ -179,8 +179,9 @@ make_ultrix_mntent(sp, tem)
tem->ufsd_uid = 0; /* XXX kept where ?*/
tem->ufsd_dev = 0; /* ?? */
tem->ufsd_exroot = 0; /* ?? */
- strncpy(tem->ufsd_path, sp->f_mntonname, ULTRIX_MAXPATHLEN);
- strncpy(tem->ufsd_devname, sp->f_mntfromname, ULTRIX_MAXPATHLEN);
+ strlcpy(tem->ufsd_path, sp->f_mntonname, sizeof(tem->ufsd_path));
+ strlcpy(tem->ufsd_devname, sp->f_mntfromname,
+ sizeof(tem->ufsd_devname));
#if 0
/* In NetBSD-1.1, filesystem type is unused and always 0 */
printf("mntent: %s type %d\n", tem->ufsd_devname, tem->ufsd_fstype);