Use strlcpy() instead of strcpy().

Requested by:	mlaier
This commit is contained in:
Ed Schouten 2008-11-13 20:40:38 +00:00
parent 2e013ce0e3
commit 279d93aa23
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=184938

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