Date: Sun, 29 Dec 2002 11:20:38 -0500 From: Mike Barcroft <mike@FreeBSD.org> To: Mark Murray <mark@grondar.za> Cc: Bruce Evans <bde@zeta.org.au>, Matthew Dillon <dillon@apollo.backplane.com>, current@FreeBSD.ORG, ia64@FreeBSD.ORG Subject: Re: ia64 tinderbox failure Message-ID: <20021229112038.D98334@espresso.q9media.com> In-Reply-To: <20021229184137.C40787-100000@gamplex.bde.org>; from bde@zeta.org.au on Sun, Dec 29, 2002 at 06:51:07PM %2B1100 References: <20021229004907.C98334@espresso.q9media.com> <20021229184137.C40787-100000@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <bde@zeta.org.au> writes: > The correct fix is to unbreak getbsize() so that it takes an `int *' as its > first arg like it used to. The interface change and the above change > just give a header length that is not directly usably by any of its users. > The header length is what must be passed to printf in %*s formats; it > should have type int since that is what printf takes; any bounds checking > of it belongs in getbsize() (but in practice it is a small positive > number since anything else would give preposterous formatting, so there > is never a problem with its bounds). Other users of getbsize() in the > src tree but perhaps not ones in ports have been broken to match the > interface breakage. The usual breakage is to cast the size_t to int > without checking bounds. Agreed. Not a single consumer actually wants a size_t and not all base system uses have been "fixed" for the new interface (ls(1) for instance). I'd like to see the interface restored and merged into RELENG_5_0 before we introduce this mistake on the world. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021229112038.D98334>