From owner-cvs-all Sat Apr 6 19:43:31 2002 Delivered-To: cvs-all@freebsd.org Received: from sunny.newgold.net (Durham-ar1-4-64-252-018.dsl.genuity.net [4.64.252.18]) by hub.freebsd.org (Postfix) with ESMTP id C754137B417; Sat, 6 Apr 2002 19:43:23 -0800 (PST) Received: from sunny.newgold.net (freebsd@localhost [IPv6:::1]) by sunny.newgold.net (8.12.1/8.12.1) with ESMTP id g373LXOI030728; Sun, 7 Apr 2002 03:22:55 GMT Received: (from freebsd@localhost) by sunny.newgold.net (8.12.1/8.12.1/Submit) id g373LVHL013952; Sun, 7 Apr 2002 03:21:31 GMT Date: Sun, 7 Apr 2002 03:20:09 +0000 From: "J. Mallett" To: "J. Mallett" Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/sed process.c Message-ID: <20020407032009.A28997@FreeBSD.ORG> References: <200204070229.g372Tui51878@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200204070229.g372Tui51878@freefall.freebsd.org> User-Agent: Mutt/1.3.21i Organisation: FreeBSD 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 Sat, Apr 06, 2002 at 06:29:56PM -0800, J. Mallett wrote: > jmallett 2002/04/06 18:29:56 PST > > Modified files: > usr.bin/sed process.c > Log: > Fix sed(1) in the case where a last line is specified and hold space is not > specified, and then the first part of the pattern space is deleted, when > there are two or more input lines, as this results in subtraction of one from > an unsigned integral value of '0'. That bogus value is used in one case > for a loop (that will run far too many times in this case) and a function to > search for a value within a specified range of memory, however now the range > of memory is obscenely large and a segmentation fault will occur. This is > fixed by checking for and appropriately handling a nil pattern space as if > the specified search in memory failed, as indeed it obviously will with nil > pattern space. > > Submitted by: Tim J. Robbins > PR: bin/34813 > Reviewed by: mike > MFC after: 1 day This was a lie. I had thought since this change had been tested pretty much verbatim in other BSD's it'd be okay to short MFC, since it fixed a bug in a known-good way, but nevertheless, it's been pointed out to me I should wait a little longer, so I'll wake 3 days I suppose. Hope nobody had an anneurism over it! Sorry for the confusion. -- jmallett@FreeBSD.org | C, MIPS, POSIX, UNIX, BSD, IRC Geek. http://www.FreeBSD.org | The Power to Serve "We all need mirrors to remind ourselves who we are -- I'm no different." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message