cvs commit: src/sys/compat/linux linux_misc.c

Alexander Leidinger netchild at FreeBSD.org
Sat Dec 2 06:56:26 PST 2006


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


More information about the cvs-all mailing list