From 68fe655b77ab978f8d03f8feec46801220bd46c5 Mon Sep 17 00:00:00 2001 From: Jean-Francois Brousseau Date: Tue, 22 Jun 2004 23:52:19 +0000 Subject: Replace a whole bunch of scary uses of strncpy() with strlcpy() and use compat-specific MAXNAMLEN values where appropriate ok millert@, pedro@ --- sys/compat/sunos/sunos_misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/compat/sunos') diff --git a/sys/compat/sunos/sunos_misc.c b/sys/compat/sunos/sunos_misc.c index 60e2486ed31..df3cf2dc84b 100644 --- a/sys/compat/sunos/sunos_misc.c +++ b/sys/compat/sunos/sunos_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sunos_misc.c,v 1.44 2004/06/22 20:45:33 deraadt Exp $ */ +/* $OpenBSD: sunos_misc.c,v 1.45 2004/06/22 23:52:18 jfb Exp $ */ /* $NetBSD: sunos_misc.c,v 1.65 1996/04/22 01:44:31 christos Exp $ */ /* @@ -400,7 +400,7 @@ sunos_readdir_callback(arg, bdp, cookie) idb.d_off = cookie; idb.d_reclen = sunos_reclen; idb.d_namlen = bdp->d_namlen; - strlcpy(idb.d_name, bdp->d_name, SUNOS_MAXNAMLEN+1); + strlcpy(idb.d_name, bdp->d_name, sizeof(idb.d_name)); if ((error = copyout((caddr_t)&idb, cb->outp, sunos_reclen))) return (error); -- cgit v1.2.3