]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use bcopy instead of strlcpy in uipc_bind and unp_connect, since
authoremaste <emaste@FreeBSD.org>
Thu, 3 Jul 2008 23:26:10 +0000 (23:26 +0000)
committeremaste <emaste@FreeBSD.org>
Thu, 3 Jul 2008 23:26:10 +0000 (23:26 +0000)
commit240825654b391ec4881cb7faaeaae4ec983bb980
treedacc78ee8dca28200324cec99bfde5c5e2d313b8
parenta47dd1888d3c3115651e4eb66c821d2bd55fd087
Use bcopy instead of strlcpy in uipc_bind and unp_connect, since
soun->sun_path isn't a null-terminated string.  As UNIX(4) states, "the
terminating NUL is not part of the address."  Since strlcpy has to return
"the total length of the string [it] tried to create," it walks off the end
of soun->sun_path looking for a \0.

This reverts r105332.

Reported by:    Ryan Stone
sys/kern/uipc_usrreq.c