Whamcloud - gitweb
Don't crash if s_inode_size is zero
authorTheodore Ts'o <tytso@mit.edu>
Fri, 7 Sep 2007 20:40:25 +0000 (16:40 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 7 Sep 2007 20:40:25 +0000 (16:40 -0400)
commitba9d929d914654f8dba36c634bb537ecf0f0bb04
treeb28889a772d7f0131e75350bbac4dda72036f977
parent5845caa464d51e1dceeb6282c3a00957ae435de1
Don't crash if s_inode_size is zero

Any attempt to open a filesystem with s_inode_size set to zero causes
a floating point exception.  This is true for e2fsck, dumpe2fs,
e2image, etc.  Fix ext2fs_open2() so that it returns the error code
EXT2_ET_CORRUPT_SUPERBLOCK instead of crashing.

Thanks to Dean Bender for reporting this bug.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/openfs.c