In message <4ce1239e.cfi90hszocfe81w+%[email protected]>
        so spake apg (phy0):

> $ sed 'c\'    # the same with 'i\' and 'a\'
> Segmentation fault (core dumped)
> $ uname -rs
> OpenBSD 4.6

Try this.

 - todd

Index: compile.c
===================================================================
RCS file: /home/cvs/openbsd/src/usr.bin/sed/compile.c,v
retrieving revision 1.33
diff -u -r1.33 compile.c
--- compile.c   1 Jul 2010 17:04:24 -0000       1.33
+++ compile.c   15 Nov 2010 20:05:39 -0000
@@ -685,8 +685,9 @@
                }
        }
        free(lbuf);
+       text = xrealloc(text, size + 1);
        text[size] = '\0';
-       return (xrealloc(text, size + 1));
+       return (text);
 }
 
 /*

Reply via email to