From c90efc20c7570b0e3a39e75514216e9d7d11c47b Mon Sep 17 00:00:00 2001 From: Jun-ichiro itojun Hagino Date: Sun, 9 Jun 2002 02:38:12 +0000 Subject: strlcpy fix, PR 2727 --- usr.sbin/bad144/bad144.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/bad144') diff --git a/usr.sbin/bad144/bad144.c b/usr.sbin/bad144/bad144.c index 2fad8ce27b2..5a19c907e5a 100644 --- a/usr.sbin/bad144/bad144.c +++ b/usr.sbin/bad144/bad144.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)bad144.c 8.1 (Berkeley) 6/6/93";*/ -static char *rcsid = "$Id: bad144.c,v 1.12 2002/05/29 09:47:20 deraadt Exp $"; +static char *rcsid = "$Id: bad144.c,v 1.13 2002/06/09 02:38:11 itojun Exp $"; #endif /* not lint */ /* @@ -153,7 +153,7 @@ usage: (void)snprintf(name, sizeof(name), "%sr%s%c", _PATH_DEV, argv[0], 'a' + RAW_PART); else - strlcpy(name, argv[0], MAXPATHLEN); + strlcpy(name, argv[0], sizeof(name)); f = open(name, argc == 1? O_RDONLY : O_RDWR); if (f < 0) Perror(name); -- cgit v1.2.3