diff --git a/telnetd/sys_term.c b/telnetd/sys_term.c index 02a7b7c..781e0d1 100644 --- a/telnetd/sys_term.c +++ b/telnetd/sys_term.c @@ -414,7 +414,8 @@ getpty(int *ptynum __unused) if (pn == NULL) return (-1); - strcpy(line, pn); + if (strlcpy(line, pn, sizeof line) >= sizeof line) + return (-1); return (p); }