summaryrefslogtreecommitdiff
path: root/usr.bin/telnet/tn3270.c
diff options
context:
space:
mode:
authorHans Insulander <hin@cvs.openbsd.org>2003-04-03 12:05:59 +0000
committerHans Insulander <hin@cvs.openbsd.org>2003-04-03 12:05:59 +0000
commit448414f170f311452f7117c6fdee8addb9964a55 (patch)
tree5985aafeee6c66fd128fbae71c50424316ebdc06 /usr.bin/telnet/tn3270.c
parent7bf1f7730951cca007e18a5cb600dbfd7418da34 (diff)
strcpy -> strlcpy
strcat -> strlcat ok millert@
Diffstat (limited to 'usr.bin/telnet/tn3270.c')
-rw-r--r--usr.bin/telnet/tn3270.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/telnet/tn3270.c b/usr.bin/telnet/tn3270.c
index bf31a940fc0..fb9cf0bd516 100644
--- a/usr.bin/telnet/tn3270.c
+++ b/usr.bin/telnet/tn3270.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tn3270.c,v 1.4 2001/11/19 19:02:16 mpech Exp $ */
+/* $OpenBSD: tn3270.c,v 1.5 2003/04/03 12:05:58 hin Exp $ */
/* $NetBSD: tn3270.c,v 1.5 1996/02/28 21:04:18 thorpej Exp $ */
/*
@@ -389,12 +389,12 @@ settranscom(argc, argv)
if (argc == 1) {
return 1;
}
- transcom = tline;
- (void) strcpy(transcom, argv[1]);
+ strlcpy(tline, argv[1], sizeof(tline));
for (i = 2; i < argc; ++i) {
- (void) strcat(transcom, " ");
- (void) strcat(transcom, argv[i]);
+ strlcat(tline, " ", sizeof(tline));
+ strlcat(tline, argv[i], sizeof(tline));
}
+ transcom = tline;
return 1;
}
#endif /* defined(unix) */