From owner-svn-src-all@FreeBSD.ORG Sun Mar 7 12:04:19 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6979F10656B4; Sun, 7 Mar 2010 12:04:19 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 812FB8FC0C; Sun, 7 Mar 2010 12:04:18 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o27C4GmQ046280; Sun, 7 Mar 2010 15:04:16 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1267963456; bh=AoahMvbh2DP4GpPc7E2aLKUTccTYgIltP9Jm0jJ6Dn0=; l=1479; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=c7VfOj9n4JWckOODL9e3/g3XkQM8sg2Tkxdpge/gSqehc5+DfFlwSph6gou94acAL ar71i+9/f55yvWc42seq9GsPqZDOKmlPzmZDDavub6hp5atmv/uBl1P3lKigrbEmjR DDQdmMiTU7gW/gOLZx1KPP/40gzJTnxup3hJC2U0= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o27C4FCm046279; Sun, 7 Mar 2010 15:04:16 +0300 (MSK) (envelope-from ache) Date: Sun, 7 Mar 2010 15:04:14 +0300 From: Andrey Chernov To: Jaakko Heinonen , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG Message-ID: <20100307120414.GB45796@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Jaakko Heinonen , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201003061921.o26JLv36014114@svn.freebsd.org> <20100307104626.GA9015@a91-153-117-195.elisa-laajakaista.fi> <20100307115210.GA45796@nagual.pp.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100307115210.GA45796@nagual.pp.ru> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Additionally (was Re: svn commit: r204803 - head/usr.bin/uniq) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 12:04:19 -0000 On Sun, Mar 07, 2010 at 02:52:11PM +0300, Andrey Chernov wrote: > On Sun, Mar 07, 2010 at 12:46:27PM +0200, Jaakko Heinonen wrote: > > On 2010-03-06, Andrey A. Chernov wrote: > > > 3) Enforce the implied LINE_MAX limit (from POSIX definition of "text file" > > > and POSIX uniq(1) description). > > > > Although a file with lines longer than LINE_MAX isn't a text file by > > POSIX definition I don't think that POSIX requires uniq(1) to reject > > non-POSIX text files. Thus I would like to keep the support for longer > > lines. > > Strictly speaking, POSIX says that uniq(1) (among others) supposed to work > with text files. Keeping it working with non-text ones too will be an > _extension_, not covered by POSIX. > > But thinking about your suggestion the question immediately arises: how > much "longer lines"? say, up to 6x times? up part of memory avaliable? up > to size_t max? etc. > > Any sort of limit still will remains the limit, but we already have POSIX > limit for that. I don't see much sense to replace one limit with the same > kind of it, but, say, 2x bigger. > > Moreover, very big limits will cause security risk easily producing lack > of resources (memory). If you feel that current LINE_MAX 2048 is too low limit, the proper fix will be to bump it, but allowing uncontrollable grown lines leads to denial-of-service attacks (not exhausted memory only but infinite swap too). -- http://ache.pp.ru/