diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2023-12-27 15:41:04 +0100 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2023-12-27 15:41:04 +0100 |
commit | 4ccdaba5ab560862f89d1d971fbcc2ef424e1867 (patch) | |
tree | a7931e13df9cc887017eaa143b4dac66de959d90 /fs/squashfs/block.c | |
parent | 1cdc605c7d70a390ff75a814a26c6f45d75778be (diff) | |
parent | 861deac3b092f37b2c5e6871732f3e11486f7082 (diff) |
Merge tag 'v6.7-rc7' into gpio/for-next
Linux 6.7-rc7
Diffstat (limited to 'fs/squashfs/block.c')
-rw-r--r-- | fs/squashfs/block.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/squashfs/block.c b/fs/squashfs/block.c index 581ce9519339..2dc730800f44 100644 --- a/fs/squashfs/block.c +++ b/fs/squashfs/block.c @@ -321,7 +321,7 @@ int squashfs_read_data(struct super_block *sb, u64 index, int length, TRACE("Block @ 0x%llx, %scompressed size %d\n", index - 2, compressed ? "" : "un", length); } - if (length < 0 || length > output->length || + if (length <= 0 || length > output->length || (index + length) > msblk->bytes_used) { res = -EIO; goto out; |