From owner-freebsd-hackers Mon Jan 13 02:40:05 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id CAA05020 for hackers-outgoing; Mon, 13 Jan 1997 02:40:05 -0800 (PST) Received: from nic.follonett.no (nic.follonett.no [194.198.43.10]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id CAA04936 for ; Mon, 13 Jan 1997 02:39:43 -0800 (PST) Received: (from uucp@localhost) by nic.follonett.no (8.8.3/8.8.3) with UUCP id LAA18524; Mon, 13 Jan 1997 11:33:13 +0100 (MET) Received: from oo7 (oo7.dimaga.com [192.0.0.65]) by dimaga.com (8.7.5/8.7.2) with SMTP id LAA04568; Mon, 13 Jan 1997 11:22:40 +0100 (MET) Message-Id: <3.0.32.19970113112240.00a38800@dimaga.com> X-Sender: eivind@dimaga.com X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Mon, 13 Jan 1997 11:22:41 +0100 To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) From: Eivind Eklund Subject: Re: number of lines in a file, given its size Cc: hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk At 11:23 PM 1/12/97 +0100, J Wunsch wrote: >As Terry Lambert wrote: > >> I think erroring out to "okshells" on the malloc failure is a bit >> bogus... > >malloc errors are bogus, too. :) The hell will break afterwards >anyway, so it doesn't matter whether it returns `okshells' or >something else. Race condition and possibly (very minor) security problem - I would have it print "No memory" and exit(EXIT_FAILURE); No security hole too small etc... Eivind Eklund / perhaps@yes.no / http://maybe.yes.no/perhaps/