Restore the MAXPATHLEN comparison in basename.c, don't forget that strlcpy()
authorJeroen Ruigrok/asmodai <asmodai@dragonflybsd.org>
Sun, 18 Sep 2005 16:09:45 +0000 (16:09 +0000)
committerJeroen Ruigrok/asmodai <asmodai@dragonflybsd.org>
Sun, 18 Sep 2005 16:09:45 +0000 (16:09 +0000)
commit40723c97dc03c09a6fa1a741d49915f11bbab7b5
tree7872e065750a205bb5ea687f6789cea6691398ac
parent40db3a1f84bd4ed7c990164a81abf155af665183
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().
lib/libc/gen/basename.c
lib/libc/gen/dirname.c