From owner-cvs-all@FreeBSD.ORG Wed Jun 4 21:40:17 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8429037B401; Wed, 4 Jun 2003 21:40:17 -0700 (PDT) Received: from smtp01.syd.iprimus.net.au (smtp01.syd.iprimus.net.au [210.50.30.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id E6E0A43F75; Wed, 4 Jun 2003 21:40:16 -0700 (PDT) (envelope-from tim@robbins.dropbear.id.au) Received: from dilbert.robbins.dropbear.id.au (210.50.40.234) by smtp01.syd.iprimus.net.au (7.0.015) id 3EDD516E000439B8; Thu, 5 Jun 2003 14:40:15 +1000 Received: by dilbert.robbins.dropbear.id.au (Postfix, from userid 1000) id 0CE95C90F; Thu, 5 Jun 2003 14:36:20 +1000 (EST) Date: Thu, 5 Jun 2003 14:36:20 +1000 From: Tim Robbins To: Peter Wemm Message-ID: <20030605143620.A86169@dilbert.robbins.dropbear.id.au> References: <200306041531.h54FVtOD006167@repoman.freebsd.org> <20030605032319.49F932A8C1@canning.wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030605032319.49F932A8C1@canning.wemm.org>; from peter@wemm.org on Wed, Jun 04, 2003 at 08:23:19PM -0700 cc: cvs-src@FreeBSD.org cc: Tony Finch cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/sed process.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2003 04:40:17 -0000 On Wed, Jun 04, 2003 at 08:23:19PM -0700, Peter Wemm wrote: > Tony Finch wrote: > > fanf 2003/06/04 08:31:55 PDT > > > > FreeBSD src repository > > > > Modified files: > > usr.bin/sed process.c > > Log: > > Fix substitution when the regex matches the zero-length string. > > There are two bugs: in the s///g case, the substitution didn't occur > > at the end of the line; in the s///N case, the code didn't count > > forwards along the line properly. See the sg, s3, s4, and s5 tests > > in src/tools/regression/usr.bin/sed/. > > > > Reviewed by: tjr > > OH MY GOD, YOU KILLED KENNY^H^H^H^H^HSED!!!! [...] > Backing out this change to process.c "fixed" it. Try this. Change 32608 by tjr@tjr_dev on 2003/06/04 20:39:50 Restore old logic to avoid putting null bytes into the output. Affected files ... ... //depot/user/tjr/freebsd-tjr/src/usr.bin/sed/process.c#3 edit Differences ... ==== //depot/user/tjr/freebsd-tjr/src/usr.bin/sed/process.c#3 (text+ko) ==== 363a364,366 > } else if (match[0].rm_so == slen) { > s += match[0].rm_so; > slen = -1;