String paranoia fix. Synched from normal telnet.

git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@69387 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This commit is contained in:
asmodai 2000-11-30 13:10:01 +00:00
parent a352b628e8
commit e84c612e39
1 changed files with 2 additions and 2 deletions

View File

@ -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 {