From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 8 11:48:51 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DFF3106566C; Wed, 8 Sep 2010 11:48:51 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id C08988FC08; Wed, 8 Sep 2010 11:48:50 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 016171FFC36; Wed, 8 Sep 2010 11:48:49 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id BA3F6844EB; Wed, 8 Sep 2010 13:48:49 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexander Best References: <20100831180103.GA92584@freebsd.org> <86fwxt5ng1.fsf@ds4.des.no> <20100901222834.GA66517@freebsd.org> <864oe8mpga.fsf@ds4.des.no> <20100902114655.GA9071@freebsd.org> <8639tsl5q0.fsf@ds4.des.no> <20100902122348.GA38047@freebsd.org> <86pqwwjoef.fsf@ds4.des.no> <20100905203757.GA11586@freebsd.org> <86r5h4shbu.fsf@ds4.des.no> <20100908105050.GA4892@freebsd.org> Date: Wed, 08 Sep 2010 13:48:49 +0200 In-Reply-To: <20100908105050.GA4892@freebsd.org> (Alexander Best's message of "Wed, 8 Sep 2010 10:50:50 +0000") Message-ID: <8662ygihge.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: expand_number() for fetch'es -B and -S switches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2010 11:48:51 -0000 Alexander Best writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Alexander Best writes: > > > so how about forgetting about expand_number() and simply > > > introducing a maximum buffer size of 1 megabyte? > > so how about just leaving the code alone? :) > i thought you wanted to have a maximum buffer size of 1MB in fetch? Yes, I was just commenting on the highly roundabout way we followed only to end up almost at the status quo. > right now -B can be any value and it's quite easy to trigger ENOMEM. "don't do that, then!" My suggestion is that if you're going to change it at all, use expand_number() *and* limit it to 1 MB. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no