From owner-freebsd-audit Thu Jan 24 13:43:11 2002 Delivered-To: freebsd-audit@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id F39BE37B400 for ; Thu, 24 Jan 2002 13:43:07 -0800 (PST) Received: from localhost (arr@localhost) by fledge.watson.org (8.11.6/8.11.5) with SMTP id g0OLgUf65234; Thu, 24 Jan 2002 16:42:31 -0500 (EST) (envelope-from arr@FreeBSD.org) X-Authentication-Warning: fledge.watson.org: arr owned process doing -bs Date: Thu, 24 Jan 2002 16:42:30 -0500 (EST) From: "Andrew R. Reiter" X-Sender: arr@fledge.watson.org To: "Andrey A. Chernov" Cc: Alexey Zelkin , audit@FreeBSD.org Subject: Re: CFR: strncpy -> strlcpy in setlocale() In-Reply-To: <20020124213730.GA87013@nagual.pp.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 25 Jan 2002, Andrey A. Chernov wrote: :On Thu, Jan 24, 2002 at 21:58:35 +0200, Alexey Zelkin wrote: :> hi, :> :> Any objections against this patch ? It's based on :> rev 1.23 of NetBSD's setlocale.c. : :Ok. I know strlcpy() makes more sense than strncpy(), but is there any difference in terms of speed? This being said, if strlcpy() is slower and the strncpy() usage is correct, is there really a need for a change? I guess readability and possible future mistakes in usage are a bonus for strlcpy. Cheers, Andrew -- Andrew R. Reiter arr@watson.org arr@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message