tech-security archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: strscpy



On Tue, May 19, 2020 at 07:31:39AM +0200, Maxime Villard wrote:
> copystr() has a small dozen of users.

nxr only finds two - can we please fix that and have a version that does
a full index?

> 	https://m00nbsd.net/garbage/libkern/strscpy.diff

I find that function totally ugly, (a) due to the return value overload
and (b) why would any caller care to tell the two possible error values
apart? and (c) it leaves the destination non-null terminated in one of
the failure cases.

Martin


Home | Main Index | Thread Index | Old Index