diff options
author | Thierry Deval <tdeval@cvs.openbsd.org> | 2003-04-05 00:43:21 +0000 |
---|---|---|
committer | Thierry Deval <tdeval@cvs.openbsd.org> | 2003-04-05 00:43:21 +0000 |
commit | 28816b14035bb08ad1d134a6d059b038e14eb7d8 (patch) | |
tree | 4cdd8655a357f40d8bfa4e236e802ffeb3ec3969 /lib/libc/time | |
parent | 89818c6c69a0745284f6b5368cadd229bfe9c8cb (diff) |
strcpy/strcat -> strlcpy/strlcat
ok tedu@, hints by deraadt@ and millert@
Diffstat (limited to 'lib/libc/time')
-rw-r--r-- | lib/libc/time/zdump.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/time/zdump.c b/lib/libc/time/zdump.c index 5b902cf5607..dd3f71b8e77 100644 --- a/lib/libc/time/zdump.c +++ b/lib/libc/time/zdump.c @@ -5,7 +5,7 @@ #if defined(LIBC_SCCS) && !defined(lint) && !defined(NOID) static char elsieid[] = "@(#)zdump.c 7.29"; -static char rcsid[] = "$OpenBSD: zdump.c,v 1.10 2003/02/14 18:24:53 millert Exp $"; +static char rcsid[] = "$OpenBSD: zdump.c,v 1.11 2003/04/05 00:43:20 tdeval Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -209,7 +209,7 @@ _("%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n"), (void) exit(EXIT_FAILURE); } to = 0; - (void) strcpy(fakeenv[to++], "TZ="); + strlcpy(fakeenv[to++], "TZ=", longest + 4); for (from = 0; environ[from] != NULL; ++from) if (strncmp(environ[from], "TZ=", 3) != 0) fakeenv[to++] = environ[from]; @@ -219,7 +219,7 @@ _("%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n"), for (i = optind; i < argc; ++i) { static char buf[MAX_STRING_LENGTH]; - (void) strcpy(&fakeenv[0][3], argv[i]); + strlcpy(&fakeenv[0][3], argv[i], longest + 1); if (!vflag) { show(argv[i], now, FALSE); continue; |