From owner-freebsd-bugs Tue Jun 27 8:50: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id AADA237B657 for ; Tue, 27 Jun 2000 08:50:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id IAA22300; Tue, 27 Jun 2000 08:50:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Tue, 27 Jun 2000 08:50:02 -0700 (PDT) Message-Id: <200006271550.IAA22300@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Adrian Chadd Subject: Re: kern/19535: procfs_rlimit tidyup Reply-To: Adrian Chadd Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/19535; it has been noted by GNATS. From: Adrian Chadd To: Garrett Wollman Cc: freebsd-gnats-submit@freebsd.org Subject: Re: kern/19535: procfs_rlimit tidyup Date: Tue, 27 Jun 2000 17:49:22 +0200 On Tue, Jun 27, 2000, Garrett Wollman wrote: > < > > + psbuf = (char *)malloc(512 * sizeof(char), M_TEMP, M_WAITOK); > > sizeof(char) is defined to be 1. Being pedantic. > > + /* XXX conservative, but potentially overflowable */ > > It should be possible to compute the exact buffer size. Since this > code is not frequently run, I would suggest that a two-pass approach > would not hurt. I'm going to go through later on and redo this repeated evilness in procfs. I thought I'd submit this change now to get rid of the blantant hacks. Adrian -- Adrian Chadd Build a man a fire, and he's warm for the rest of the evening. Set a man on fire and he's warm for the rest of his life. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message