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 Message-ID: <199606270221.WAA14135@mongoose.bostic.com>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606270221.WAA14135>