Date: Thu, 15 Jul 1999 18:16:15 -0600 From: Warner Losh <imp@village.org> To: Brett Glass <brett@lariat.org> Cc: Sheldon Hearn <sheldonh@uunet.co.za>, Paul Hart <hart@iserver.com>, freebsd-security@FreeBSD.ORG Subject: Re: OpenBSD's strlcpy(3) and strlcat(3) Message-ID: <199907160016.SAA01040@harmony.village.org> In-Reply-To: Your message of "Thu, 15 Jul 1999 18:05:06 MDT." <4.2.0.58.19990715180119.04723d20@localhost> References: <4.2.0.58.19990715180119.04723d20@localhost> <Your message of "Thu, 15 Jul 1999 17:47:03 CST." <4.2.0.58.19990715174241.045f0550@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <4.2.0.58.19990715180119.04723d20@localhost> Brett Glass writes: : 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). That's what strl* are defined to do. They always return the length of the string that would have resulted, had it not been truncated. That way it can either be used or ignored as the programmer sees fit. I don't see much value in computing return-value - size as another, incompatible argument. Warner 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?199907160016.SAA01040>