Date: Sat, 2 Dec 2006 14:56:26 +0000 (UTC) From: Alexander Leidinger <netchild@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/compat/linux linux_misc.c Message-ID: <200612021456.kB2EuQvS063108@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
netchild 2006-12-02 14:56:26 UTC
FreeBSD src repository
Modified files:
sys/compat/linux linux_misc.c
Log:
MFP4 (108673, 110519, 110874):
- Currently LINUX_MAX_COMM_LEN is smaller than MAXCOMLEN, but in case
this will change we have a buffer overflow. Apply some defensive
programming to DTRT when this should happen.
- Use copyinstr() instead of copyin where appropriate.
* Fallback to copyin() in case of ENAMETOOLONG. [1]
* Use the right source and destination (it was wrong before).
- Use strlcpy instead of strcpy.
- Properly lock the read case (PR_GET_NAME) like the write case.
Reviewed by: rwatson (except [1])
Suggested by: rwatson [1]
Revision Changes Path
1.198 +30 -5 src/sys/compat/linux/linux_misc.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612021456.kB2EuQvS063108>
