From owner-cvs-all Mon Sep 3 4:33:42 2001 Delivered-To: cvs-all@freebsd.org Received: from heechee.tobez.org (254.adsl0.ryv.worldonline.dk [213.237.10.254]) by hub.freebsd.org (Postfix) with ESMTP id 468C537B408; Mon, 3 Sep 2001 04:33:31 -0700 (PDT) Received: by heechee.tobez.org (Postfix, from userid 1001) id 4DB07542E; Mon, 3 Sep 2001 13:33:28 +0200 (CEST) Date: Mon, 3 Sep 2001 13:33:28 +0200 From: Anton Berezin To: Josef Karthauser Cc: Paul Richards , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/pkg_install/update pkg_update.pl Message-ID: <20010903133328.A35211@heechee.tobez.org> References: <200012300014.eBU0E1238805@freefall.freebsd.org> <20010902012740.A11122@tao.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010902012740.A11122@tao.org.uk>; from joe@tao.org.uk on Sun, Sep 02, 2001 at 01:27:40AM +0100 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Sep 02, 2001 at 01:27:40AM +0100, Josef Karthauser wrote: > On Fri, Dec 29, 2000 at 04:14:01PM -0800, Paul Richards wrote: > > paul 2000/12/29 16:14:01 PST > > > > Modified files: > > usr.sbin/pkg_install/update pkg_update.pl > > Log: > > Change open modes from ">$file" to "> $file" because it's much safer should > > $file not be what you expect, particularly should $file turn out to be > > "+REQUIRES" since ">+" is a valid open mode. > > > > This isn't currently a problem since $file is constructed safely > > but it removes the potential of future problems. > > Pointed out by Anton Berezin. > > > > Revision Changes Path > > 1.3 +3 -3 src/usr.sbin/pkg_install/update/pkg_update.pl > > Sorry I've taken so long to get around to this one. > > Are you sure? The perl docs for 'open' explicitly say that the + > needs to come before the >. Oops. It looks like it was not a problem. ;-) I think that this change should stay regardless, however. "> $file" is easier to read than ">$file". +Anton. -- May the tuna salad be with you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message