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:
parent
7aa7324a8f
commit
8d9786e342
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue