diff options
author | ed <ed@FreeBSD.org> | 2008-11-13 20:40:38 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2008-11-13 20:40:38 +0000 |
commit | 1c998c296e7f4c398c2fc177d3648a7c1f6d46c1 (patch) | |
tree | ec12bba4bf21522d8746fe4d01161170247fc5d8 /contrib/telnet/telnetd | |
parent | 86b366c6fe6a0434bd7140b2e00bdcd3ddb6ffc9 (diff) | |
download | FreeBSD-src-1c998c296e7f4c398c2fc177d3648a7c1f6d46c1.zip FreeBSD-src-1c998c296e7f4c398c2fc177d3648a7c1f6d46c1.tar.gz |
Use strlcpy() instead of strcpy().
Requested by: mlaier
Diffstat (limited to 'contrib/telnet/telnetd')
-rw-r--r-- | contrib/telnet/telnetd/sys_term.c | 3 |
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); } |