Whamcloud - gitweb
resize2fs: check for bogus new_size
authorEric Sandeen <sandeen@redhat.com>
Fri, 10 Oct 2008 22:38:15 +0000 (17:38 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 13 Oct 2008 03:12:22 +0000 (23:12 -0400)
commit279a000fdcfd5fa79f18c975978d1c6bfa3113a3
tree1fb94636ea9bdc287b79630c2612e0349e4fe99c
parent7ed7a4b6ed8b2fce891874a0eafdc8f77c3ffc34
resize2fs: check for bogus new_size

If we don't check for new_size == 0, bogus values send resize2fs into
a tailspin:

resize2fs 1.41.0 (10-Jul-2008)
Illegal block number passed to ext2fs_test_block_bitmap #1 for block bitmap for
/tmp/tmp.lntZtMFvz8/fake-disk
...the same message repeated zillion times...

Probably should see where that loop is, but at any rate we should
error-check parse_num_blocks.

Thanks to Petr Muller for reporting this.

Addresses-Red-Hat-Bugzilla: #465984

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
resize/main.c