android_kernel_xiaomi_sm8350/fs/squashfs
Phillip Lougher 363911d027 Squashfs: Valid filesystems are flagged as bad by the corrupted fs patch
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>
2009-03-12 03:23:48 +00:00
..
block.c Squashfs: Valid filesystems are flagged as bad by the corrupted fs patch 2009-03-12 03:23:48 +00:00
cache.c Squashfs: Fix oops when reading fsfuzzer corrupted filesystems 2009-03-05 00:31:12 +00:00
dir.c
export.c
file.c
fragment.c
id.c
inode.c Squashfs: frag_size should be signed, as it can hold an error result 2009-03-05 00:55:31 +00:00
Kconfig
Makefile
namei.c
squashfs_fs_i.h
squashfs_fs_sb.h
squashfs_fs.h
squashfs.h Squashfs: Fix oops when reading fsfuzzer corrupted filesystems 2009-03-05 00:31:12 +00:00
super.c Squashfs: Fix oops when reading fsfuzzer corrupted filesystems 2009-03-05 00:31:12 +00:00
symlink.c