9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <rsc@swtch.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] sed crash
Date: Wed,  4 Feb 2009 20:15:54 -0800	[thread overview]
Message-ID: <dd6fe68a0902042015k395267cs2970d14face611dc@mail.gmail.com> (raw)
In-Reply-To: <5d375e920902041828p173f0f3etdd5fabd3a65bc330@mail.gmail.com>

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


  parent reply	other threads:[~2009-02-05  4:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-05  2:28 Uriel
2009-02-05  2:59 ` Pietro Gagliardi
2009-02-05  3:08   ` Pietro Gagliardi
2009-02-05  3:45     ` Pietro Gagliardi
2009-02-05  3:51       ` Akshat Kumar
2009-02-05  3:58         ` andrey mirtchovski
2009-02-05  4:39           ` Pietro Gagliardi
2009-02-05 11:14             ` Iruata Souza
2009-02-05 13:16             ` erik quanstrom
2009-02-05 14:31               ` Joel C. Salomon
2009-02-05 14:44                 ` erik quanstrom
2009-02-05 21:02               ` Pietro Gagliardi
2009-02-05 21:13                 ` erik quanstrom
2009-02-07  0:21                   ` Derek Fawcus
2009-02-05 21:21                 ` john
2009-02-05 23:02             ` Akshat Kumar
2009-02-05 23:11               ` hiro
2009-02-05 23:18                 ` Akshat Kumar
2009-02-05  4:15 ` Russ Cox [this message]
2009-02-05 14:41   ` Uriel
2009-02-05 17:27     ` Russ Cox
2009-02-05 22:56       ` Uriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dd6fe68a0902042015k395267cs2970d14face611dc@mail.gmail.com \
    --to=rsc@swtch.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).