String paranoia fix. Synched from normal telnet.

This commit is contained in:
Jeroen Ruigrok van der Werven 2000-11-30 13:10:01 +00:00
parent 79c8781d5e
commit d904cf9f8e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69387
2 changed files with 4 additions and 4 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 {

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 {