On Sat, 2022-01-08 at 22:34 +0100, Henrik Carlqvist wrote: > But what about the case marked with <--X above? To me it seems as if > the function returns after having modified const char *name bu using > userend.
You're right, that's wrong. It turns out to be innocuous because none of the callers care that the value of the input string is modified if we return a different string, but it's still wrong and should be fixed. Thanks for noticing!