056c1a0528
returned on a perfectly valid bzip2 stream whose decompressed size is multiple of read-ahead buffer size. Reproduce the problem is easy: create some power-of-two sized file (truncate -s 1m file will do), bzip2 it and try to load it as md_image from loader. See how it fails. The bug doesn't affect gzip code (which most of bzip2-reading code was copied from) probably due to the fact that libgzip doesn't report Z_STREAM_END with the last block, but requires extra call to inflate() to retrieve it and has some extra data in the input stream at that time. However, apply similar fix to gzipfs.c just in the case the API will change in the future to do what bzip2 code does. Add some ifdef'ed code to enable testing bzipfs.c from witin normal FreeBSD environment as opposed to the restricted loader one, so that one can use gdb and whatnot. Sponsored by: Sippy Software, Inc., http://www.sippysoft.com/ MFC in: 7 days |
||
---|---|---|
.. | ||
arm | ||
i386 | ||
powerpc | ||
sparc64 | ||
__main.c | ||
arp.c | ||
assert.c | ||
bcd.c | ||
bootp.c | ||
bootp.h | ||
bootparam.c | ||
bootparam.h | ||
bswap.c | ||
bzipfs.c | ||
cd9660.c | ||
close.c | ||
closeall.c | ||
dev.c | ||
dosfs.c | ||
dosfs.h | ||
environment.c | ||
ether.c | ||
ext2fs.c | ||
fstat.c | ||
getopt.c | ||
gets.c | ||
globals.c | ||
gzipfs.c | ||
if_ether.h | ||
in_cksum.c | ||
inet_ntoa.c | ||
ioctl.c | ||
iodesc.h | ||
libstand.3 | ||
lseek.c | ||
Makefile | ||
net.c | ||
net.h | ||
netif.c | ||
netif.h | ||
nfs.c | ||
nfsv2.h | ||
nullfs.c | ||
open.c | ||
pager.c | ||
printf.c | ||
qdivrem.c | ||
quad.h | ||
random.c | ||
rarp.c | ||
read.c | ||
readdir.c | ||
rpc.c | ||
rpc.h | ||
rpcv2.h | ||
saioctl.h | ||
sbrk.c | ||
splitfs.c | ||
stand.h | ||
stat.c | ||
strcasecmp.c | ||
strdup.c | ||
strerror.c | ||
strtol.c | ||
tftp.c | ||
tftp.h | ||
twiddle.c | ||
udp.c | ||
ufs.c | ||
write.c | ||
zalloc_defs.h | ||
zalloc_malloc.c | ||
zalloc_mem.h | ||
zalloc_protos.h | ||
zalloc.c |