mirror of
https://github.com/sheumann/telnetd.git
synced 2024-05-28 19:41:28 +00:00
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:
parent
a352b628e8
commit
e84c612e39
|
@ -859,7 +859,7 @@ doit(who)
|
||||||
fatal(net, "Out of ptys");
|
fatal(net, "Out of ptys");
|
||||||
|
|
||||||
if ((pty = open(lp, 2)) >= 0) {
|
if ((pty = open(lp, 2)) >= 0) {
|
||||||
strcpy(line,lp);
|
strlcpy(line,lp,sizeof(line));
|
||||||
line[5] = 't';
|
line[5] = 't';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1158,7 +1158,7 @@ telnet(f, p, host)
|
||||||
HN = Getstr("hn", &cp);
|
HN = Getstr("hn", &cp);
|
||||||
IM = Getstr("im", &cp);
|
IM = Getstr("im", &cp);
|
||||||
if (HN && *HN)
|
if (HN && *HN)
|
||||||
(void) strcpy(host_name, HN);
|
(void) strlcpy(host_name, HN, sizeof(host_name));
|
||||||
if (IM == 0)
|
if (IM == 0)
|
||||||
IM = "";
|
IM = "";
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user