From owner-freebsd-audit Thu Jan 24 13:51: 4 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 DF29E37B416 for ; Thu, 24 Jan 2002 13:51:01 -0800 (PST) Received: from localhost (arr@localhost) by fledge.watson.org (8.11.6/8.11.5) with SMTP id g0OLoYb65339; Thu, 24 Jan 2002 16:50:34 -0500 (EST) (envelope-from arr@FreeBSD.org) X-Authentication-Warning: fledge.watson.org: arr owned process doing -bs Date: Thu, 24 Jan 2002 16:50:34 -0500 (EST) From: "Andrew R. Reiter" X-Sender: arr@fledge.watson.org To: "Todd C. Miller" Cc: "Andrey A. Chernov" , Alexey Zelkin , audit@FreeBSD.org Subject: Re: CFR: strncpy -> strlcpy in setlocale() In-Reply-To: <200201242148.g0OLmHJi006634@xerxes.courtesan.com> 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 Thu, 24 Jan 2002, Todd C. Miller wrote: : :strlcpy() is generally faster since strncpy() does NUL fill and so :will also write "len" bytes even when the source string is much :smaller. Ahh, very cool. Thanks for the information. -- 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