Use strlcpy() instead of strcpy().

Requested by:	mlaier


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@184938 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This commit is contained in:
ed 2008-11-13 20:40:38 +00:00
parent 7aa7324a8f
commit 8d9786e342
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}