summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorasmodai <asmodai@FreeBSD.org>2000-11-30 13:10:01 +0000
committerasmodai <asmodai@FreeBSD.org>2000-11-30 13:10:01 +0000
commit5c47bfad32a5617289109456f5575379f75794f8 (patch)
tree6bc5ecb58753a2167ef49163ffb947837fe65fad /contrib
parentc022086cba88f5e79775e2d887cfc7661da81f78 (diff)
downloadFreeBSD-src-5c47bfad32a5617289109456f5575379f75794f8.zip
FreeBSD-src-5c47bfad32a5617289109456f5575379f75794f8.tar.gz
String paranoia fix. Synched from normal telnet.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/telnet/telnetd/telnetd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/telnet/telnetd/telnetd.c b/contrib/telnet/telnetd/telnetd.c
index a5a7a03..9cf34b0 100644
--- a/contrib/telnet/telnetd/telnetd.c
+++ b/contrib/telnet/telnetd/telnetd.c
@@ -859,7 +859,7 @@ doit(who)
fatal(net, "Out of ptys");
if ((pty = open(lp, 2)) >= 0) {
- strcpy(line,lp);
+ strlcpy(line,lp,sizeof(line));
line[5] = 't';
break;
}
@@ -1158,7 +1158,7 @@ telnet(f, p, host)
HN = Getstr("hn", &cp);
IM = Getstr("im", &cp);
if (HN && *HN)
- (void) strcpy(host_name, HN);
+ (void) strlcpy(host_name, HN, sizeof(host_name));
if (IM == 0)
IM = "";
} else {
OpenPOWER on IntegriCloud