cvs commit: src/usr.bin/sed process.c
Tim Robbins
tjr at FreeBSD.ORG
Wed Jun 4 21:40:18 PDT 2003
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 at 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;
More information about the cvs-src
mailing list