From: Christian Weisgerber Subject: Re: Got relies on non-POSIX basename(3), dirname(3) To: gameoftrees@openbsd.org Date: Fri, 18 Sep 2020 17:44:43 -0000 On 2020-09-18, Stefan Sperling wrote: > Could you add basename/dirname overrides to the freebsd version which > copy the string internally before use? I didn't want to worry about strdup() error handling, so I just took the OpenBSD basename.c and dirname.c. > Otherwise I don't think we could do much else but go through the basename > and dirname calls one-by-one to determine whether they rely on the string > to remain unmodified. Where a modifiable string is required, an easy fix > would be to run strdup() first, I guess? Sooner or later this is going to rear its head when the prototypes get fixed and compiler warnings about the loss of const show up... -- Christian "naddy" Weisgerber naddy@mips.inka.de