freebsd-dev/usr.bin
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
..
apply Minor whitespace nit. 2002-03-23 15:20:45 +00:00
ar remove __P 2002-03-22 01:22:50 +00:00
at mdoc(7) police: markup fixes. 2002-03-15 15:26:57 +00:00
awk Use our auto-YACC'ing rules to do most of the work. 2002-03-23 04:49:43 +00:00
banner remove __P 2002-03-22 01:22:50 +00:00
basename remove __P 2002-03-22 01:22:50 +00:00
biff remove __P 2002-03-22 01:22:50 +00:00
brandelf
bzip2
c89
calendar Add myself. 2002-04-02 03:16:50 +00:00
cap_mkdb remove __P 2002-03-22 01:22:50 +00:00
chat remove __P 2002-03-22 01:22:50 +00:00
checknr remove __P 2002-03-22 01:22:50 +00:00
chflags remove __P 2002-03-22 01:22:50 +00:00
chkey
chpass Rename a couple of local variables to avoid warnings. 2002-04-06 19:04:22 +00:00
cksum remove __P 2002-03-22 01:22:50 +00:00
cmp remove __P 2002-03-22 01:22:50 +00:00
col remove __P 2002-03-22 01:22:50 +00:00
colcrt remove __P 2002-03-22 01:22:50 +00:00
colldef
colrm remove __P 2002-03-22 01:22:50 +00:00
column remove __P 2002-03-22 01:22:50 +00:00
comm remove __P 2002-03-22 01:22:50 +00:00
compile_et
compress unifdef -D__STDC__ 2002-03-23 23:19:00 +00:00
ctags remove __P 2002-03-22 01:22:50 +00:00
cut
dig
dirname remove __P 2002-03-22 01:22:50 +00:00
dnskeygen
dnsquery
doscmd Mark some parameters as unused. 2002-03-30 13:51:40 +00:00
du remove __P 2002-03-22 01:22:50 +00:00
ee Add support for french and german locales in tcsh's way. 2002-03-04 12:37:08 +00:00
elf2aout Utility to create a.out [kernels] from an ELF one. 2002-03-28 02:17:27 +00:00
enigma
env remove __P 2002-03-22 01:22:50 +00:00
expand remove __P 2002-03-22 01:22:50 +00:00
false
fetch Restored the part of 1.45 that was clobbered in rev.1.46: 2002-03-27 02:23:18 +00:00
file
file2c Modernize my email address 2002-03-25 13:53:46 +00:00
find There is breakage in parsedate, so revert to get_date until this can be 2002-04-02 10:45:34 +00:00
finger remove __P 2002-03-22 01:22:50 +00:00
fmt
fold remove __P 2002-03-22 01:22:50 +00:00
from Introduce flags enumeration with standard 2002-03-26 12:15:31 +00:00
fstat Fix constness warnings. 2002-03-30 14:03:53 +00:00
fsync
ftp
gcore Don't use gcc specific flags. 2002-03-30 17:19:40 +00:00
gencat Add FBSDID. Spelling. Remove unused includes. Check more malloc failures. 2002-03-26 12:39:08 +00:00
getconf
getopt
gprof Include <stdint.h> for definition of intmax_t and/or uintmax_t. 2002-03-25 05:23:45 +00:00
head 1) Staticise. 2002-03-30 17:17:26 +00:00
hesinfo remove __P 2002-03-22 01:22:50 +00:00
hexdump remove __P 2002-03-22 01:22:50 +00:00
host
id remove __P 2002-03-22 01:22:50 +00:00
indent 1) Const enough things to avoid warnings. 2002-03-30 17:10:20 +00:00
ipcrm remove __P 2002-03-22 01:22:50 +00:00
ipcs 1) Add missing prototypes for fmt_perm and cvt_time. 2002-03-30 16:46:04 +00:00
join Support -o 0 in join(1) as per SUS. 2002-03-26 03:44:04 +00:00
jot remove __P 2002-03-22 01:22:50 +00:00
kdump Const the code. 2002-04-01 10:45:09 +00:00
kenv
keylogin
keylogout
killall Use the method described in the strtol man page to check if it parsed 2002-03-30 16:24:03 +00:00
ktrace 1) Clean up vendor and ID strings. 2002-04-01 10:49:11 +00:00
ktrdump Add a man page. 2002-04-02 04:26:37 +00:00
lam
last remove __P 2002-03-22 01:22:50 +00:00
lastcomm remove __P 2002-03-22 01:22:50 +00:00
ldd remove __P 2002-03-22 01:22:50 +00:00
leave remove __P 2002-03-22 01:22:50 +00:00
less
lessecho
lesskey
lex Back out rev. 1.6 (NOLIB bootstrap helper) OBE'd by Makefile.inc1,v 1.96. 2002-03-28 10:53:49 +00:00
limits Don't use gcc specific flags. 2002-04-01 10:54:11 +00:00
locate remove __P 2002-03-22 01:22:50 +00:00
lock remove __P 2002-03-22 01:22:50 +00:00
lockf
logger 1) Use FBSDID for vendor string. 2002-04-01 11:06:00 +00:00
login remove __P 2002-03-22 01:22:50 +00:00
logname remove __P 2002-03-22 01:22:50 +00:00
look remove __P 2002-03-22 01:22:50 +00:00
lorder
lsvfs
m4 remove __P 2002-03-22 01:33:25 +00:00
mail remove __P 2002-03-22 01:33:25 +00:00
make o unifdef -D__STDC__ 2002-03-23 23:30:30 +00:00
makewhatis
mesg remove __P 2002-03-22 01:33:25 +00:00
minigzip
mkdep
mkfifo remove __P 2002-03-22 01:33:25 +00:00
mklocale
mkstr remove __P 2002-03-22 01:33:25 +00:00
mktemp remove __P 2002-03-22 01:33:25 +00:00
msgs remove __P 2002-03-22 01:33:25 +00:00
mt remove __P 2002-03-22 01:33:25 +00:00
ncal
ncplist
ncplogin
netstat Print IFT_ETHER addresses with ether_ntoa(3) (with leading zeros). 2002-04-06 10:02:20 +00:00
newkey remove __P 2002-03-22 01:33:25 +00:00
nfsstat remove __P 2002-03-22 01:33:25 +00:00
nice remove __P 2002-03-22 01:33:25 +00:00
nl remove __P 2002-03-22 01:33:25 +00:00
nm remove __P 2002-03-22 01:33:25 +00:00
nohup remove __P 2002-03-22 01:33:25 +00:00
objformat
opieinfo
opiekey
opiepasswd
pagesize
passwd remove __P 2002-03-22 01:33:25 +00:00
paste remove __P 2002-03-22 01:33:25 +00:00
pr Add P1003.1-2001 -f and -p options. 2002-03-31 18:44:36 +00:00
printenv remove __P 2002-03-22 01:33:25 +00:00
printf remove __P 2002-03-22 01:33:25 +00:00
quota remove __P 2002-03-22 01:33:25 +00:00
ranlib remove __P 2002-03-22 01:33:25 +00:00
renice remove __P 2002-03-22 01:33:25 +00:00
rev remove __P 2002-03-22 01:33:25 +00:00
rlogin o unifdef -D__STDC__ 2002-03-23 23:35:42 +00:00
rpcgen remove __P 2002-03-22 01:33:25 +00:00
rpcinfo
rs remove __P 2002-03-22 01:33:25 +00:00
rsh Const what I could on a first pass. 2002-03-30 08:51:21 +00:00
rup
ruptime remove __P 2002-03-22 01:33:25 +00:00
rusers
rwall Revert/fix the most controversial parts of the last commit: 2002-03-07 14:11:41 +00:00
rwho remove __P 2002-03-22 01:33:25 +00:00
sasc remove __P 2002-03-22 01:42:45 +00:00
script remove __P 2002-03-22 01:42:45 +00:00
sed 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
shar
showmount remove __P 2002-03-22 01:42:45 +00:00
size remove __P 2002-03-22 01:42:45 +00:00
smbutil
sockstat
soelim remove __P 2002-03-22 01:42:45 +00:00
sort Use the new features of cdefs.h. 2002-04-06 21:09:31 +00:00
split remove __P 2002-03-22 01:42:45 +00:00
strings remove __P 2002-03-22 01:42:45 +00:00
strip remove __P 2002-03-22 01:42:45 +00:00
su Fix a few typos. 2002-03-30 11:47:18 +00:00
symorder remove __P 2002-03-22 01:42:45 +00:00
systat unifdef __STDC__ 2002-03-23 23:37:07 +00:00
tail remove __P 2002-03-22 01:42:45 +00:00
talk remove __P 2002-03-22 01:42:45 +00:00
tconv
tcopy Include <stdint.h> for definition of intmax_t and/or uintmax_t. 2002-03-25 05:23:45 +00:00
tee remove __P 2002-03-22 01:42:45 +00:00
telnet
tftp Clean up vendor ID and FBSDID. 2002-03-30 14:18:15 +00:00
time remove __P 2002-03-22 01:42:45 +00:00
tip remove __P 2002-03-22 01:42:45 +00:00
top remove __P 2002-03-22 01:42:45 +00:00
touch remove __P 2002-03-22 01:42:45 +00:00
tput remove __P 2002-03-22 01:42:45 +00:00
tr remove __P 2002-03-22 01:42:45 +00:00
true
truncate remove __P 2002-03-22 01:42:45 +00:00
truss
tset remove __P 2002-03-22 01:42:45 +00:00
tsort remove __P 2002-03-22 01:42:45 +00:00
tty remove __P 2002-03-22 01:42:45 +00:00
uac
ul remove __P 2002-03-22 01:42:45 +00:00
uname remove __P 2002-03-22 01:42:45 +00:00
unexpand remove __P 2002-03-22 01:42:45 +00:00
unifdef remove __P 2002-03-22 01:42:45 +00:00
uniq remove __P 2002-03-22 01:42:45 +00:00
units
unvis remove __P 2002-03-22 01:42:45 +00:00
usbhidctl Install libusbhid, and use it instead of libusb. 2002-03-28 18:44:25 +00:00
users remove __P 2002-03-22 01:42:45 +00:00
uudecode remove __P 2002-03-22 01:42:45 +00:00
uuencode remove __P 2002-03-22 01:42:45 +00:00
vacation
vgrind remove __P 2002-03-22 01:42:45 +00:00
vi remove __P 2002-03-22 01:42:45 +00:00
vis remove __P 2002-03-22 01:42:45 +00:00
vmstat remove __P 2002-03-22 01:42:45 +00:00
w remove __P 2002-03-22 01:42:45 +00:00
wall
wc remove __P 2002-03-22 01:42:45 +00:00
what remove __P 2002-03-22 01:42:45 +00:00
whereis
which Off by one error in checking max file name length. 2002-03-09 15:30:42 +00:00
who remove __P 2002-03-22 01:42:45 +00:00
whois Leave the `copyright' variable exposed, since the main purpose of it 2002-03-07 10:06:00 +00:00
window
write remove __P 2002-03-22 01:42:45 +00:00
xargs ANSIfy: Function declarations and prototypes, use of environ(7). 2002-03-15 22:54:58 +00:00
xinstall remove __P 2002-03-22 01:42:45 +00:00
xlint remove __P 2002-03-22 01:42:45 +00:00
xstr remove __P 2002-03-22 01:42:45 +00:00
yacc Revert the "tell the program name in diagnostics". What was I thinking?? 2002-04-05 03:21:41 +00:00
yes
ypcat
ypmatch
ypwhich
Makefile Exclude xlint for ia64. For the time being, there are enough gcc 2002-04-06 05:51:59 +00:00
Makefile.inc