Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6dc8c04 authored by Janne Kalliomäki's avatar Janne Kalliomäki Committed by Linus Torvalds
Browse files

hfsplus: fix overflow in sector calculations in hfsplus_submit_bio



The variable io_size was unsigned int, which caused the wrong sector number
to be calculated after aligning it. This then caused mount to fail with big
volumes, as backup volume header information was searched from a
wrong sector.

Signed-off-by: default avatarJanne Kalliomäki <janne@tuxera.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 485802a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -56,7 +56,7 @@ int hfsplus_submit_bio(struct super_block *sb, sector_t sector,
	DECLARE_COMPLETION_ONSTACK(wait);
	DECLARE_COMPLETION_ONSTACK(wait);
	struct bio *bio;
	struct bio *bio;
	int ret = 0;
	int ret = 0;
	unsigned int io_size;
	u64 io_size;
	loff_t start;
	loff_t start;
	int offset;
	int offset;