From owner-freebsd-arch Wed Dec 13 2:32:39 2000 From owner-freebsd-arch@FreeBSD.ORG Wed Dec 13 02:32:36 2000 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id AE7BA37B400; Wed, 13 Dec 2000 02:32:35 -0800 (PST) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id LAA65764; Wed, 13 Dec 2000 11:32:34 +0100 (CET) (envelope-from des@ofug.org) Sender: des@ofug.org X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: assar@FreeBSD.ORG Cc: arch@FreeBSD.ORG Subject: Re: Safe string formatting in the kernel References: <200012120259.eBC2xfb99004@earth.backplane.com> <20001211185610.A1741@citusc.usc.edu> <200012121820.LAA31234@harmony.village.org> <5l66kozzhm.fsf@assaris.sics.se> <20001212234514.A73840@dragon.nuxi.com> <5lvgsovjik.fsf@assaris.sics.se> From: Dag-Erling Smorgrav Date: 13 Dec 2000 11:32:33 +0100 In-Reply-To: assar@FreeBSD.ORG's message of "13 Dec 2000 08:59:47 +0100" Message-ID: Lines: 16 User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG assar@FreeBSD.ORG writes: > Sizes I get on i386: > > text filename > 111 strlcat.o > 69 strlcpy.o > 35 strcpy.o > 43 strcat.o strlcat() / strlcpy() shouldn't be more than a few bytes larger than strcat() / strcpy(), and the latter can be replaced by macros that call the former with a size of UINT_MAX. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message