2014-03-17 19:04 GMT+01:00 John Scipione <jscipione@xxxxxxxxx>: > This is not right. > > B_PATH_NAME_LENGTH is defined as PATH_MAX > > According to this: > http://pubs.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html > > {PATH_MAX} Maximum number of bytes in a pathname, including the > terminating null character. > According to hrev24425 commit message [1], _kern_read_link follow the readlink() specs [2]: "Conforming applications should not assume that the returned contents of the symbolic link are null-terminated." I understand that the specification of PATH_MAX means PATH_MAX minus 1 has to be passed to _kern_read_link as buffer size parameter. Bye, Jérôme [1] http://cgit.haiku-os.org/haiku/commit/?id=hrev24425 [2] http://pubs.opengroup.org/onlinepubs/009695399/functions/readlink.html