51d6d0952b
the start of the section headers has to take into account the fact that the image_nt_header is really variable sized. It happens that the existing calculation is correct for _most_ production binaries produced by the Windows DDK, but if we get a binary with oddball offsets, the PE loader could crash. Changes from the supplied patch are: - We don't really need to use the IMAGE_SIZEOF_NT_HEADER() macro when computing how much of the header to return to callers of pe_get_optional_header(). While it's important to take the variable size of the header into account in other calculations, we never actually look at anything outside the non-variable portion of the header. This saves callers from having to allocate a variable sized buffer off the heap (I purposely tried to avoid using malloc() in subr_pe.c to make it easier to compile in both the -D_KERNEL and !-D_KERNEL case), and since we're copying into a buffer on the stack, we always have to copy the same amount of data or else we'll trash the stack something fierce. - We need <stddef.h> to get offsetof() in the !-D_KERNEL case. - ndiscvt.c needs the IMAGE_FIRST_SECTION() macro too, since it does a little bit of section pre-processing. PR: kern/83477 |
||
---|---|---|
.. | ||
ac | ||
accton | ||
acpi | ||
adduser | ||
amd | ||
ancontrol | ||
apm | ||
apmd | ||
arlcontrol | ||
arp | ||
asf | ||
atm | ||
authpf | ||
bluetooth | ||
boot0cfg | ||
boot98cfg | ||
bootparamd | ||
bsnmpd | ||
btxld | ||
burncd | ||
cdcontrol | ||
chkgrp | ||
chown | ||
chroot | ||
ckdist | ||
config | ||
cron | ||
crunch | ||
ctm | ||
daemon | ||
dconschat | ||
devinfo | ||
digictl | ||
diskinfo | ||
dnssec-keygen | ||
dnssec-signzone | ||
editmap | ||
edquota | ||
eeprom | ||
elf2exe | ||
extattr | ||
extattrctl | ||
faithd | ||
fdcontrol | ||
fdformat | ||
fdread | ||
fdwrite | ||
flowctl | ||
fwcontrol | ||
getfmac | ||
getpmac | ||
gstat | ||
i4b | ||
ifmcstat | ||
inetd | ||
iostat | ||
ip6addrctl | ||
ipfwpcap | ||
IPXrouted | ||
jail | ||
jexec | ||
jls | ||
kbdcontrol | ||
kbdmap | ||
kernbb | ||
keyserv | ||
kgmon | ||
kgzip | ||
kldxref | ||
lastlogin | ||
lmcconfig | ||
lpr | ||
lptcontrol | ||
mailstats | ||
mailwrapper | ||
makemap | ||
manctl | ||
memcontrol | ||
mergemaster | ||
mixer | ||
mld6query | ||
mlxcontrol | ||
mount_nwfs | ||
mount_portalfs | ||
mount_smbfs | ||
mountd | ||
moused | ||
mptable | ||
mrouted | ||
mtest | ||
mtree | ||
named | ||
named-checkconf | ||
named-checkzone | ||
named.reload | ||
ndiscvt | ||
ndp | ||
newsyslog | ||
nfsd | ||
ngctl | ||
nghook | ||
nologin | ||
ntp | ||
ofwdump | ||
pccard | ||
pciconf | ||
pcvt | ||
periodic | ||
pkg_install | ||
pmccontrol | ||
pmcstat | ||
pnpinfo | ||
portsnap | ||
powerd | ||
ppp | ||
pppctl | ||
pppd | ||
pppstats | ||
praliases | ||
procctl | ||
pstat | ||
pw | ||
pwd_mkdb | ||
quot | ||
quotaon | ||
rarpd | ||
raycontrol | ||
repquota | ||
rip6query | ||
rmt | ||
rndc | ||
rndc-confgen | ||
route6d | ||
rpc.lockd | ||
rpc.statd | ||
rpc.umntall | ||
rpc.yppasswdd | ||
rpc.ypupdated | ||
rpc.ypxfrd | ||
rpcbind | ||
rrenumd | ||
rtadvd | ||
rtprio | ||
rtsold | ||
rwhod | ||
sa | ||
sade | ||
sendmail | ||
setfmac | ||
setpmac | ||
sicontrol | ||
sliplogin | ||
slstat | ||
smbmsg | ||
snapinfo | ||
spkrtest | ||
spray | ||
sysinstall | ||
syslogd | ||
tcpdchk | ||
tcpdmatch | ||
tcpdrop | ||
tcpdump | ||
timed | ||
traceroute | ||
traceroute6 | ||
trpt | ||
tzsetup | ||
ugidfw | ||
usbd | ||
usbdevs | ||
vidcontrol | ||
vipw | ||
vnconfig | ||
watch | ||
watchdogd | ||
wicontrol | ||
wlconfig | ||
wpa | ||
yp_mkdb | ||
ypbind | ||
yppoll | ||
yppush | ||
ypserv | ||
ypset | ||
zic | ||
zzz | ||
Makefile | ||
Makefile.inc |