From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <5d375e920902041828p173f0f3etdd5fabd3a65bc330@mail.gmail.com> References: <5d375e920902041828p173f0f3etdd5fabd3a65bc330@mail.gmail.com> Date: Wed, 4 Feb 2009 20:15:54 -0800 Message-ID: Subject: Re: [9fans] sed crash From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 964b54ba-ead4-11e9-9d60-3106f5b1d025 Sed is fixed in plan9port. $ hg diff sed.c diff -r 478b53880a80 src/cmd/sed.c --- a/src/cmd/sed.c Wed Feb 04 20:12:48 2009 -0800 +++ b/src/cmd/sed.c Wed Feb 04 20:13:08 2009 -0800 @@ -994,7 +994,7 @@ return 0; subexp[0].s.rsp = buf; subexp[0].e.rep = 0; - if (rregexec(pattern, linebuf, subexp, MAXSUB)) { + if (rregexec(pattern, linebuf, subexp, MAXSUB) > 0) { loc1 = subexp[0].s.rsp; loc2 = subexp[0].e.rep; return 1; $ http://hg.pdos.csail.mit.edu/hg/plan9/rev/0bf86c524c9b