From owner-freebsd-security Thu Jul 15 16:21:44 1999 Delivered-To: freebsd-security@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 0401414FF8 for ; Thu, 15 Jul 1999 16:21:37 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id RAA29511; Thu, 15 Jul 1999 17:20:57 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id RAA73691; Thu, 15 Jul 1999 17:20:57 -0600 (MDT) Message-Id: <199907152320.RAA73691@harmony.village.org> To: Garance A Drosihn Subject: Re: OpenBSD's strlcpy(3) and strlcat(3) Cc: Paul Hart , freebsd-security@FreeBSD.ORG In-reply-to: Your message of "Thu, 15 Jul 1999 17:33:29 EDT." References: Date: Thu, 15 Jul 1999 17:20:57 -0600 From: Warner Losh Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In message Garance A Drosihn writes: : What I wanted to do was have "estr" routines, where the destination : is specified as the starting point and the ending point of the area : available for the string (as two parameters). The routines would : return the position of the current string-terminator. So you could : do things like: : eos = estrcpy(dest, endp, src1); : eos = estrcat(eos, endp, src2); : eos = estrcat(eos, endp, src3); : and you could check for "string is full" by comparing 'eos' (the : return value) to 'endp' (which you'd already have). Strictly : speaking that won't work quite right in some cases, so the strlcpy : routines also have an advantage there. Yes. It would take a lot of talking and convincing to get me to support adding something other than strl* routines. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message