]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r298337:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 13 May 2016 08:41:09 +0000 (08:41 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 13 May 2016 08:41:09 +0000 (08:41 +0000)
commit0104d652e0973002606a0e4929f1dc7cae18fbaa
treeb0872cfdf17b08932ac3cf950ef3c27a31a15674
parent3a29ace8e0a8bfa72d318f66dbe11af1ffef0c2c
MFC r298337:
r298337 (by cem):

pty(4): Use strlcpy to guarantee destination buffer isn't overrun

The devtoname() name is strcpyed into a small stack buffer.  Sure, we always
expect the name to be ttyXX (or ptyXX).  If that's the case, strlcpy() doesn't
hurt.

CID: 1006768

git-svn-id: svn://svn.freebsd.org/base/stable/10@299623 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/pty/pty.c