diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2004-06-22 23:52:19 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2004-06-22 23:52:19 +0000 |
commit | 68fe655b77ab978f8d03f8feec46801220bd46c5 (patch) | |
tree | cf71e1513645d4dd977c3b1b4a92d6ec1578c8f6 /sys/compat/sunos | |
parent | 5557b30319fbfe74844a640472fa29a826d1be8b (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/sunos')
-rw-r--r-- | sys/compat/sunos/sunos_misc.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |