mirror of
https://github.com/sheumann/telnetd.git
synced 2025-03-13 07:34:45 +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");
|
||||
|
||||
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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user