freebsd-dev/usr.bin/sed
Juli Mallett ae17860040 Fix sed(1) in the case where a last line is specified and hold space is not
specified, and then the first part of the pattern space is deleted, when
there are two or more input lines, as this results in subtraction of one from
an unsigned integral value of '0'.  That bogus value is used in one case
for a loop (that will run far too many times in this case) and a function to
search for a value within a specified range of memory, however now the range
of memory is obscenely large and a segmentation fault will occur.  This is
fixed by checking for and appropriately handling a nil pattern space as if
the specified search in memory failed, as indeed it obviously will with nil
pattern space.

Submitted by:	Tim J. Robbins <tim@robbins.dropbear.id.au>
PR:		bin/34813
Reviewed by:	mike
MFC after:	1 day
2002-04-07 02:29:56 +00:00
..
TEST
compile.c remove __P 2002-03-22 01:42:45 +00:00
defs.h Remove local redefinition for err(). Add usage(). 1997-08-11 07:21:08 +00:00
extern.h remove __P 2002-03-22 01:42:45 +00:00
main.c remove __P 2002-03-22 01:42:45 +00:00
Makefile Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3. 2002-02-08 23:07:37 +00:00
misc.c WARNS=2 partial fix; use NO_WERROR to protect against some hard-to-fix warnings. 2001-12-12 23:20:16 +00:00
POSIX
process.c Fix sed(1) in the case where a last line is specified and hold space is not 2002-04-07 02:29:56 +00:00
sed.1 mdoc(7) police: utilize the new .Ex macro. 2001-08-15 09:09:47 +00:00