WSL2-Linux-Kernel/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
..
Kconfig fs/Kconfig: move squashfs out 2009-01-22 13:15:58 +03:00
Makefile Squashfs: Makefiles 2009-01-05 08:46:27 +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 Squashfs: directory readdir operations 2009-01-05 08:46:23 +00:00
export.c Squashfs: export operations 2009-01-05 08:46:25 +00:00
file.c Squashfs: regular file operations 2009-01-05 08:46:24 +00:00
fragment.c Squashfs: fragment block operations 2009-01-05 08:46:25 +00:00
id.c Squashfs: uid/gid lookup operations 2009-01-05 08:46:26 +00:00
inode.c Squashfs: frag_size should be signed, as it can hold an error result 2009-03-05 00:55:31 +00:00
namei.c Squashfs: directory lookup operations 2009-01-05 08:46:23 +00:00
squashfs.h Squashfs: Fix oops when reading fsfuzzer corrupted filesystems 2009-03-05 00:31:12 +00:00
squashfs_fs.h btrfs & squashfs: Move btrfs and squashfsto's magic number to <linux/magic.h> 2009-01-15 16:39:38 -08:00
squashfs_fs_i.h Squashfs: header files 2009-01-05 08:46:27 +00:00
squashfs_fs_sb.h Squashfs: header files 2009-01-05 08:46:27 +00:00
super.c Squashfs: Fix oops when reading fsfuzzer corrupted filesystems 2009-03-05 00:31:12 +00:00
symlink.c Squashfs: symlink operations 2009-01-05 08:46:24 +00:00