summaryrefslogtreecommitdiffstats
path: root/sys/net/if_lagg.c
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2007-12-18 01:50:49 +0000
committersobomax <sobomax@FreeBSD.org>2007-12-18 01:50:49 +0000
commiteb79d09fc64f5a2e33875ebc41a3ff8659bbec5e (patch)
tree0373328ca14f5f425319b5f3628ce16186963f72 /sys/net/if_lagg.c
parent285c9ed21486857e29e37d37af1c9d1139a882d6 (diff)
downloadFreeBSD-src-eb79d09fc64f5a2e33875ebc41a3ff8659bbec5e.zip
FreeBSD-src-eb79d09fc64f5a2e33875ebc41a3ff8659bbec5e.tar.gz
Fix logical bug in the bzip2 reading code, which results in bogus EIO
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
Diffstat (limited to 'sys/net/if_lagg.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud