From bostic@mongoose.bostic.com  Wed Jun 26 19:30:04 1996
Received: from mongoose.bostic.com (bostic@mongoose.BSDI.COM [205.230.230.129])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id TAA13793
          for <FreeBSD-gnats-submit@FreeBSD.org>; Wed, 26 Jun 1996 19:30:00 -0700 (PDT)
Received: (from bostic@localhost) by mongoose.bostic.com (8.7.4/8.7.3) id WAA14135; Wed, 26 Jun 1996 22:21:17 -0400 (EDT)
Message-Id: <199606270221.WAA14135@mongoose.bostic.com>
Date: Wed, 26 Jun 1996 22:21:17 -0400 (EDT)
From: Keith Bostic <bostic@bsdi.com>
To: mark@linus.demon.co.uk
Cc: freebsd-bugs@freefall.freebsd.org, FreeBSD-gnats-submit@FreeBSD.org,
        gnats@freefall.freebsd.org, mckusick@McKusick.COM, plm@xs4all.nl,
        torek@bsdi.com
Subject: Re: New bug introduced with sed bugfix

>Number:         1356
>Category:       bin
>Synopsis:       Re: New bug introduced with sed bugfix
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 26 19:40:01 PDT 1996
>Closed-Date:    Wed Jul 3 15:59:30 PDT 1996
>Last-Modified:  Tue Nov 27 19:22:23 PST 2001
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mpp 
State-Changed-When: Wed Jul 3 15:59:30 PDT 1996 
State-Changed-Why:  
Bogus PR. 
>Unformatted:
Here's the current patch that BSD/OS is using.
We've reviewed it and tested it on all of the
bug reports that we had.

Sure hope it works,
--keith

===================================================================
RCS file: /master/usr.bin/sed/compile.c,v
retrieving revision 2.3
retrieving revision 2.5
diff -c -r2.3 -r2.5
*** compile.c	1996/06/03 21:25:33	2.3
--- compile.c	1996/06/27 01:11:13	2.5
***************
*** 1,4 ****
! /*	BSDI $Id: compile.c,v 2.3 1996/06/03 21:25:33 bostic Exp $	*/
  
  /*-
   * Copyright (c) 1992 Diomidis Spinellis.
--- 1,4 ----
! /*	BSDI $Id: compile.c,v 2.5 1996/06/27 01:11:13 bostic Exp $	*/
  
  /*-
   * Copyright (c) 1992 Diomidis Spinellis.
***************
*** 595,601 ****
  static char *
  compile_text()
  {
! 	int asize, size;
  	char *text, *p, *op, *s;
  	char lbuf[_POSIX2_LINE_MAX + 1];
  
--- 595,601 ----
  static char *
  compile_text()
  {
! 	int asize, esc_nl, size;
  	char *text, *p, *op, *s;
  	char lbuf[_POSIX2_LINE_MAX + 1];
  
***************
*** 606,618 ****
  		op = s = text + size;
  		p = lbuf;
  		EATSPACE();
! 		for (; *p; p++) {
! 			if (*p == '\\')
! 				p++;
  			*s++ = *p;
  		}
  		size += s - op;
! 		if (p[-2] != '\\') {
  			*s = '\0';
  			break;
  		}
--- 606,618 ----
  		op = s = text + size;
  		p = lbuf;
  		EATSPACE();
! 		for (esc_nl = 0; *p != '\0'; p++) {
! 			if (*p == '\\' && *++p == '\n')
! 				esc_nl = 1;
  			*s++ = *p;
  		}
  		size += s - op;
! 		if (!esc_nl) {
  			*s = '\0';
  			break;
  		}

