On Tue, Sep 25, 2018 at 04:32:03PM +1000, Simon Burge wrote: > Is the correct fix to use memmove(3) instead of memcpy(3) inside > dirname(3), or are we restricted by some standard from having dirname(3) > be able to be called on the results of a previous dirname(3) call in > which case we should document this in the manpage?
dirname(3) and basename(3) can return the original buffer altered, or return static memory. The standard allows both behavior, and Linux uses the former while NetBSD uses the later. This is decade old pain when porting software, -- Emmanuel Dreyfus m...@netbsd.org