From owner-freebsd-current Wed Nov 24 8:43:14 1999 Delivered-To: freebsd-current@freebsd.org Received: from relay.nuxi.com (nuxi.cs.ucdavis.edu [169.237.7.38]) by hub.freebsd.org (Postfix) with ESMTP id 7168C14FB9; Wed, 24 Nov 1999 08:43:06 -0800 (PST) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (root@d60-025.leach.ucdavis.edu [169.237.60.25]) by relay.nuxi.com (8.9.3/8.9.3) with ESMTP id IAA61137; Wed, 24 Nov 1999 08:43:05 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.9.3/8.9.1) id IAA77960; Wed, 24 Nov 1999 08:43:04 -0800 (PST) (envelope-from obrien) Date: Wed, 24 Nov 1999 08:43:04 -0800 From: "David O'Brien" To: Dan Moschuk Cc: current@FreeBSD.ORG Subject: Re: Overflow in banner(1) Message-ID: <19991124084304.B77698@dragon.nuxi.com> Reply-To: obrien@FreeBSD.ORG References: <199911240747.AAA18880@harmony.village.org> <199911240758.JAA96963@zibbi.mikom.csir.co.za> <19991124071946.G49362@dragon.nuxi.com> <19991124113139.D264@spirit.jaded.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <19991124113139.D264@spirit.jaded.net>; from dan@FreeBSD.ORG on Wed, Nov 24, 1999 at 11:31:39AM -0500 X-Operating-System: FreeBSD 4.0-CURRENT Organization: The NUXI BSD group X-PGP-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Keyid: 34F9F9D5 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I've never done this myself, but I've always been under the impression that > sizeof(*buf) would work for dynamically allocated buffers. sizeof() is an operator whose value is determined at compile time. sizeof(*buf) gives the size of what buf points to. This would be `1' if buf were a char*, or `4' if buf were an int* [on the i386]. -- -- David (obrien@NUXI.com) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message