cvs commit: src/lib/libc/gen basename.c dirname.c

Jeroen Ruigrok/asmodai asmodai at crater.dragonflybsd.org
Sun Sep 18 09:12:48 PDT 2005


asmodai     2005/09/18 09:09:45 PDT

DragonFly src repository

  Modified files:
    lib/libc/gen         basename.c dirname.c 
  Log:
  Restore the MAXPATHLEN comparison in basename.c, don't forget that strlcpy()
  returns the size of the *source string* and not destination.
  
  Rework dirname.c as well to a hybrid of the old and new situation due to path
  being a potential large source string than we want to compare with to
  MAXPATHLEN.
  Get rid of the old strncpy() construct though by using strlcpy().
  
  Revision  Changes    Path
  1.8       +1 -1      src/lib/libc/gen/basename.c
  1.10      +2 -1      src/lib/libc/gen/dirname.c


http://www.dragonflybsd.org/cvsweb/src/lib/libc/gen/basename.c.diff?r1=1.7&r2=1.8&f=u
http://www.dragonflybsd.org/cvsweb/src/lib/libc/gen/dirname.c.diff?r1=1.9&r2=1.10&f=u





More information about the Commits mailing list