Skip to content
Snippets Groups Projects
user avatar
Phillip Lougher authored
Previously in squashfs_readpage() when copying data into the page
cache, it used the length of the datablock read from the filesystem
(after decompression).  However, if the filesystem has been corrupted
this data block may be short, which will leave pages unfilled.

The fix for this is to compute the expected number of bytes to copy
from the inode size, and use this to detect if the block is short.

Signed-off-by: default avatarPhillip Lougher <phillip@squashfs.org.uk>
Tested-by: default avatarWilly Tarreau <w@1wt.eu>
Cc: Анатолий Тросиненко <anatoly.trosinenko@gmail.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
a3f94cb9
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Name Last commit Last update
..