https://github.com/torvalds/linux
Revision 363911d027d1de1c6df79eb3f487f5476b9619f4 authored by Phillip Lougher on 12 March 2009, 03:23:48 UTC, committed by Phillip Lougher on 12 March 2009, 03:23:48 UTC
The corrupted filesystem patch added a check against zlib trying to
output too much data in the presence of data corruption.  This check
triggered if zlib_inflate asked to be called again (Z_OK) with
avail_out == 0 and no more output buffers available.  This check proves
to be rather dumb, as it incorrectly catches the case where zlib has
generated all the output, but there are still input bytes to be processed.

This patch does a number of things.  It removes the original check and
replaces it with code to not move to the next output buffer if there
are no more output buffers available, relying on zlib to error if it
wants an extra output buffer in the case of data corruption.  It
also replaces the Z_NO_FLUSH flag with the more correct Z_SYNC_FLUSH
flag, and makes the error messages more understandable to
non-technical users.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
Reported-by: Stefan Lippers-Hollmann <s.L-H@gmx.de>
1 parent ebdcc81
History
Tip revision: 363911d027d1de1c6df79eb3f487f5476b9619f4 authored by Phillip Lougher on 12 March 2009, 03:23:48 UTC
Squashfs: Valid filesystems are flagged as bad by the corrupted fs patch
Tip revision: 363911d
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore -rw-r--r-- 867 bytes
.mailmap -rw-r--r-- 3.9 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 91.3 KB
Kbuild -rw-r--r-- 2.4 KB
MAINTAINERS -rw-r--r-- 107.1 KB
Makefile -rw-r--r-- 53.2 KB
README -rw-r--r-- 16.7 KB
REPORTING-BUGS -rw-r--r-- 3.1 KB

README

back to top