summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2002-06-03 20:41:22 +0000
committerderaadt <deraadt@openbsd.org>2002-06-03 20:41:22 +0000
commit7c86185554b88afc65e4fd0d37586d14a875d69f (patch)
tree8eadbda34464f7547d3a9dbc57279817fbbb77f8
parentspelling (diff)
downloadwireguard-openbsd-7c86185554b88afc65e4fd0d37586d14a875d69f.tar.xz
wireguard-openbsd-7c86185554b88afc65e4fd0d37586d14a875d69f.zip
strlcpy
-rw-r--r--usr.bin/top/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/top/utils.c b/usr.bin/top/utils.c
index a2dbcee3174..300acfc0905 100644
--- a/usr.bin/top/utils.c
+++ b/usr.bin/top/utils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utils.c,v 1.4 2001/11/19 19:02:17 mpech Exp $ */
+/* $OpenBSD: utils.c,v 1.5 2002/06/03 20:41:22 deraadt Exp $ */
/*
* Top users/processes display for Unix
@@ -346,7 +346,7 @@ time_t seconds;
/* sanity protection */
if (seconds < 0 || seconds > (99999l * 360l))
{
- strcpy(result, " ???");
+ strlcpy(result, " ???", sizeof result);
}
else if (seconds >= (1000l * 60l))
{