summaryrefslogtreecommitdiff
path: root/usr.sbin/catman/catman.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-15 08:32:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-15 08:32:39 +0000
commit2802a215ff29bbf5cf58ddf847579938ae5d1d19 (patch)
tree8163c86274d1e54081e7e4be68833cad1fb4b114 /usr.sbin/catman/catman.c
parentba05f0c6a4145651307b97d8c9f865a8afd48de7 (diff)
strlcpy; ok tedu
Diffstat (limited to 'usr.sbin/catman/catman.c')
-rw-r--r--usr.sbin/catman/catman.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/catman/catman.c b/usr.sbin/catman/catman.c
index b638da22c2b..7fb5c03da68 100644
--- a/usr.sbin/catman/catman.c
+++ b/usr.sbin/catman/catman.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: catman.c,v 1.5 2002/06/01 20:15:43 deraadt Exp $ */
+/* $OpenBSD: catman.c,v 1.6 2003/04/15 08:32:38 deraadt Exp $ */
/*
* Copyright (c) 1993 Winning Strategies, Inc.
* All rights reserved.
@@ -30,7 +30,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: catman.c,v 1.5 2002/06/01 20:15:43 deraadt Exp $";
+static char rcsid[] = "$Id: catman.c,v 1.6 2003/04/15 08:32:38 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -185,7 +185,7 @@ catman(const char *path, char *section)
snprintf(catpage, sizeof catpage, "%s/%s",
catdir, dp->d_name);
if ((tmp = strrchr(catpage, '.')) != NULL)
- strcpy(tmp, ".0");
+ strlcpy(tmp, ".0", catpage + sizeof catpage - tmp);
else
continue;