freebsd-skq/usr.bin
jmallett b5ca094f22 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 Remove leaf node WARNS?=2 (that mainly I added). This should 2002-02-08 22:31:43 +00:00
bzip2 Complete bzip2-1.0.2 import. 2002-02-01 16:33:40 +00:00
c89 Remove leaf node WARNS?=2 (that mainly I added). This should 2002-02-08 22:31:43 +00:00
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 Remove leaf node WARNS?=2 (that mainly I added). This should 2002-02-08 22:31:43 +00:00
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 Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3. 2002-02-08 23:07:37 +00:00
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 Remove leaf node WARNS?=2 (that mainly I added). This should 2002-02-08 22:31:43 +00:00
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 Remove leaf node WARNS?=2 (that mainly I added). This should 2002-02-08 22:31:43 +00:00
env remove __P 2002-03-22 01:22:50 +00:00
expand remove __P 2002-03-22 01:22:50 +00:00
false Remove leaf node WARNS?=2 (that mainly I added). This should 2002-02-08 22:31:43 +00:00
fetch Restored the part of 1.45 that was clobbered in rev.1.46: 2002-03-27 02:23:18 +00:00
file Install files via FILES. 2001-12-17 16:02:15 +00:00
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 Remove leaf node WARNS?=2 (that mainly I added). This should 2002-02-08 22:31:43 +00:00
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 Remove leaf node WARNS?=2 (that mainly I added). This should 2002-02-08 22:31:43 +00:00
ftp Connect lukemftp to the build as the default ftp client. Lukemftp 2001-12-13 23:46:44 +00:00
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 Remove leaf node WARNS?=2 (that mainly I added). This should 2002-02-08 22:31:43 +00:00
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 Deuglify the usage message by putting the program name after the 2001-11-15 15:46:45 +00:00
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 Remove leaf node WARNS?=2 (that mainly I added). This should 2002-02-08 22:31:43 +00:00
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 Update for less v371 2002-01-07 20:37:33 +00:00
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 Remove leaf node WARNS?=2 (that mainly I added). This should 2002-02-08 22:31:43 +00:00
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 Remove leaf node WARNS?=2 (that mainly I added). This should 2002-02-08 22:31:43 +00:00
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 o Move NTOHL() and associated macros into <sys/param.h>. These are 2002-02-18 20:35:27 +00:00
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 Remove gcc specific compiler flags, at least one of which doesn't work with 2002-01-08 08:53:12 +00:00
ncplist
ncplogin Remove leaf node WARNS?=2 (that mainly I added). This should 2002-02-08 22:31:43 +00:00
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 Remove leaf node WARNS?=2 (that mainly I added). This should 2002-02-08 22:31:43 +00:00
opieinfo Add opie lib dir to includes list 2002-01-03 21:20:29 +00:00
opiekey Add opie lib dir to includes list 2002-01-03 21:20:29 +00:00
opiepasswd Add opie lib dir to includes list 2002-01-03 21:20:29 +00:00
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 The clnt_create(KEYSERVSOCK, CRYPT_PROG, CRYPT_VERS, "unix") hacks 2002-02-05 19:26:04 +00:00
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 If the remote uptime is less than one minute, print the uptime in 2001-10-17 01:44:34 +00:00
ruptime remove __P 2002-03-22 01:33:25 +00:00
rusers I've been meaning to do this for a while. Add an underscore to the 2002-01-19 23:20:02 +00:00
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 Add bmake glue for src/contrib/smbfs and connect userland smbfs 2001-12-14 11:41:22 +00:00
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 Remove WARNS?=2 and -Wall. WARNS?=2 is going to be the default. 2001-12-12 00:06:52 +00:00
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 Remove WARNS?=2 and -Wall. WARNS?=2 is going to be the default. 2001-12-12 00:06:52 +00:00
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 Remove WARNS?=2 and -Wall. WARNS?=2 is going to be the default. 2001-12-12 00:06:52 +00:00
truncate remove __P 2002-03-22 01:42:45 +00:00
truss Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3. 2002-02-08 23:07:37 +00:00
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 Add tbl and tbsp as contractions of tablespoon, and tsp for teaspoon. 2001-12-18 11:25:58 +00:00
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 Update build infrastructure for sendmail 8.12. 2002-02-17 22:05:07 +00:00
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 WARNS=2 fix, use __FBSDID(). 2001-12-11 22:22:15 +00:00
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 Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3. 2002-02-08 23:07:37 +00:00
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 Remove WARNS=2 as this is to become default. 2001-12-11 22:56:05 +00:00
ypcat Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3. 2002-02-08 23:07:37 +00:00
ypmatch Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3. 2002-02-08 23:07:37 +00:00
ypwhich 1) Remove blank line between include of sys/cdefs.h and __FBSDID 2002-02-27 14:32:43 +00:00
Makefile Exclude xlint for ia64. For the time being, there are enough gcc 2002-04-06 05:51:59 +00:00
Makefile.inc Backout -Werror protection. No need to walk all over the upcoming 2002-02-06 18:13:12 +00:00