DragonFly BSD
DragonFly commits List (threaded) for 2005-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Jeroen Ruigrok/asmodai <asmodai@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 18 Sep 2005 09:09:45 -0700 (PDT)

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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]