summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-02-01 06:59:18 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-02-01 06:59:18 +0000
commit90da781d3471f53c6751d3ba45d9c6681f66e19a (patch)
tree9a6bdcc475df7dbbb7137c34a520b71cb4118c95 /usr.bin
parentc0663b2e69e2062ebb4fe9a96f16b4ec8275e3c5 (diff)
strlcpy
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/telnet/utilities.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/telnet/utilities.c b/usr.bin/telnet/utilities.c
index d553692f2c6..8198b4fe20f 100644
--- a/usr.bin/telnet/utilities.c
+++ b/usr.bin/telnet/utilities.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utilities.c,v 1.6 2001/11/19 19:02:16 mpech Exp $ */
+/* $OpenBSD: utilities.c,v 1.7 2002/02/01 06:59:17 itojun Exp $ */
/* $NetBSD: utilities.c,v 1.5 1996/02/28 21:04:21 thorpej Exp $ */
/*
@@ -90,7 +90,7 @@ SetSockOpt(fd, level, option, yesno)
* The following are routines used to print out debugging information.
*/
-unsigned char NetTraceFile[256] = "(standard output)";
+unsigned char NetTraceFile[MAXPATHLEN] = "(standard output)";
void
SetNetTrace(file)
@@ -101,7 +101,7 @@ SetNetTrace(file)
if (file && (strcmp(file, "-") != 0)) {
NetTrace = fopen(file, "w");
if (NetTrace) {
- strcpy((char *)NetTraceFile, file);
+ strlcpy((char *)NetTraceFile, file, sizeof(NetTraceFile));
return;
}
fprintf(stderr, "Cannot open %s.\n", file);