=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/telnet/utilities.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- src/usr.bin/telnet/utilities.c 2001/11/19 19:02:16 1.6 +++ src/usr.bin/telnet/utilities.c 2002/02/01 06:59:17 1.7 @@ -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 @@ * 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 @@ 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);