From owner-freebsd-security Thu Jul 15 16:53:28 1999 Delivered-To: freebsd-security@freebsd.org Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175]) by hub.freebsd.org (Postfix) with ESMTP id 9F48B14CB7 for ; Thu, 15 Jul 1999 16:53:22 -0700 (PDT) (envelope-from sheldonh@axl.noc.iafrica.com) Received: from sheldonh (helo=axl.noc.iafrica.com) by axl.noc.iafrica.com with local-esmtp (Exim 3.02 #1) id 114vJ3-000L13-00; Fri, 16 Jul 1999 01:52:49 +0200 From: Sheldon Hearn To: Brett Glass Cc: Warner Losh , Paul Hart , freebsd-security@FreeBSD.ORG Subject: Re: OpenBSD's strlcpy(3) and strlcat(3) In-reply-to: Your message of "Thu, 15 Jul 1999 17:47:03 CST." <4.2.0.58.19990715174241.045f0550@localhost> Date: Fri, 16 Jul 1999 01:52:49 +0200 Message-ID: <80788.932082769@axl.noc.iafrica.com> Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, 15 Jul 1999 17:47:03 CST, Brett Glass wrote: > How about returning the shortfall as the return value of the function? Um, hello? That's exactly what I'm proposing: > >RETURN VALUES > > > >If the optional shortfall argument is passed non-zero, the functions > >return the number of characters from src that are missing in dst after > >the operation. Otherwise, they return the length of dst. In either case, > >the return value does not include the NUL terminator. :-) Ciao, Sheldon. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message