Whamcloud - gitweb
Fix test in ext2fs_check_desc() for inode table within block group
authorEric Sandeen <sandeen@redhat.com>
Fri, 20 Jul 2007 21:50:26 +0000 (16:50 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 22 Jul 2007 20:00:43 +0000 (16:00 -0400)
commitbd828a27e2cfec9f14837d9a693e2a414f44bf91
tree1cd0f5c94a6b5cae923560e328342de10795e56d
parent5a92a627f1e067ecfaa2478cfafeca2817cdc69f
Fix test in ext2fs_check_desc() for inode table within block group

The test in ext2fs_check_desc() is off by one; if the inode table
goes all the way to the last block of the block group, it will
falsely assert that it has extended past it.  The last block
of a range is start + len -1, not start + len.

You can create (valid) filesystems that will cause e2fsck to complain
via one of the following mkfs commands:

mkfs.ext3 -F -b 1024 /dev/sdb1 2046000000
mke2fs -j -F -b 4096 -m 0 -N 5217280 /mnt/test/fsfile2 327680
mkfs.ext2 -F -b 1024 -m 0 -g 256 -N 3744 fsfile 1024

Addresses-Red-Hat-Bugzilla: #214765

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/check_desc.c
tests/f_full_bg/expect.1 [new file with mode: 0644]
tests/f_full_bg/expect.2 [new file with mode: 0644]
tests/f_full_bg/image.gz [new file with mode: 0644]
tests/f_full_bg/name [new file with mode: 0644]