Date: Fri, 16 Jul 1999 02:12:35 +0200 From: Sheldon Hearn <sheldonh@uunet.co.za> To: Brett Glass <brett@lariat.org> Cc: Warner Losh <imp@village.org>, Paul Hart <hart@iserver.com>, freebsd-security@FreeBSD.ORG Subject: Re: OpenBSD's strlcpy(3) and strlcat(3) Message-ID: <81297.932083955@axl.noc.iafrica.com> In-Reply-To: Your message of "Thu, 15 Jul 1999 18:05:06 CST." <4.2.0.58.19990715180119.04723d20@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 15 Jul 1999 18:05:06 CST, Brett Glass wrote: > A more consistent way to do it would be to have the function return zero > if the programmer opted not to know about any shortfall. That'd break code that doesn't expect to have to pass the additional argument that we've opted to allow for. > Or, even better, ALWAYS return the shortfall. The programmer can then > discard the return value if he's really willing to ignore it (perhaps > at his peril). Reality check: we're talking about portability here. If we take these functions into our own libc, we really should make them work as expected on other platforms. However, there's nothing to stop us extending them beyond those expectations. What I'm getting at here is that, while the strl* functions may be nice (and Mike Smith's arguments are casting some serious doubt over that idea) they could certainly be nicer. At least two other vendors already have a defined API for the functions. If we use them, we shouldn't break that API. What I propose doesn't, put it does allow for more convenient use of the functions. Ciao, Sheldon. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?81297.932083955>