diff options
author | 2003-04-05 00:43:19 +0000 | |
---|---|---|
committer | 2003-04-05 00:43:19 +0000 | |
commit | 88a28a4cc3e139e5a30e0d9d121cbb3359acb1a6 (patch) | |
tree | 614487de6ca6afb83aeefa99c5faf1f18f5632a4 /lib/libc/time | |
parent | two fixes; help from tedu & tdeval (diff) | |
download | wireguard-openbsd-88a28a4cc3e139e5a30e0d9d121cbb3359acb1a6.tar.xz wireguard-openbsd-88a28a4cc3e139e5a30e0d9d121cbb3359acb1a6.zip |
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; |