summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2008-11-13 20:40:38 +0000
committered <ed@FreeBSD.org>2008-11-13 20:40:38 +0000
commit1c998c296e7f4c398c2fc177d3648a7c1f6d46c1 (patch)
treeec12bba4bf21522d8746fe4d01161170247fc5d8
parent86b366c6fe6a0434bd7140b2e00bdcd3ddb6ffc9 (diff)
downloadFreeBSD-src-1c998c296e7f4c398c2fc177d3648a7c1f6d46c1.zip
FreeBSD-src-1c998c296e7f4c398c2fc177d3648a7c1f6d46c1.tar.gz
Use strlcpy() instead of strcpy().
Requested by: mlaier
-rw-r--r--contrib/telnet/telnetd/sys_term.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/telnet/telnetd/sys_term.c b/contrib/telnet/telnetd/sys_term.c
index 02a7b7c..781e0d1 100644
--- a/contrib/telnet/telnetd/sys_term.c
+++ b/contrib/telnet/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);
}
OpenPOWER on IntegriCloud