Le 18/05/2020 à 21:03, Martin Husemann a écrit :
On Mon, May 18, 2020 at 09:00:01PM +0200, Maxime Villard wrote:
I believe this is why copystr(), although safer than strlcpy(), isn't used much:
the length returned in a pointer is unusual.
Isn't it used (nowadays) only in ~ a single place where it needs to be
congruent with copyinstr? And it could be totaly removed quite easily?
copystr() has a small dozen of users. Yes, it could be removed easily, but
we need a better replacement first. I made this patch, the code is simple.
https://m00nbsd.net/garbage/libkern/strscpy.diff