]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit - e2fsck/pass5.c
e2fsck: fix incorrect bbitmap checksum failure caused by integer overflow
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 16 Sep 2013 13:41:15 +0000 (09:41 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 16 Sep 2013 13:41:15 +0000 (09:41 -0400)
commit2db19bce8146a63b1cef19fe4628014c7f7de816
tree5cedaf72744a8adf81176af6f758eb9769f1cde4
parentfc9f162eea8ade980b6347a70a020d43ba215540
e2fsck: fix incorrect bbitmap checksum failure caused by integer overflow

On a filesystem with more than 2^32 blocks, the block group checksum test will
fail because "i" (the group number) is a 32-bit quantity that is used to
calculate the group's block bitmap block number.  Unfortunately, "i" is not
automatically promoted to 64-bit for this calculation and overflows.  When this
happens, e2fsck will incorrectly report bitmap checksum errors.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/pass5.c