summaryrefslogtreecommitdiffstats
path: root/libexec/telnetd/telnetd.c
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/telnetd/telnetd.c')
-rw-r--r--libexec/telnetd/telnetd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/telnetd/telnetd.c b/libexec/telnetd/telnetd.c
index 57a972a..9158dfb 100644
--- a/libexec/telnetd/telnetd.c
+++ b/libexec/telnetd/telnetd.c
@@ -811,7 +811,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;
}
@@ -1115,7 +1115,7 @@ telnet(f, p, host)
IM = Getstr("im", &cp);
IF = Getstr("if", &cp);
if (HN && *HN)
- (void) strcpy(host_name, HN);
+ (void) strlcpy(host_name, HN, sizeof(host_name));
if (IF && (if_fd = open(IF, O_RDONLY, 000)) != -1)
IM = 0;
if (IM == 0)
OpenPOWER on IntegriCloud