mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2025-01-01 14:13:26 +08:00
ChangeLog, openfs.c:
openfs.c (ext2fs_open): Check to make sure that the number of blocks per group is not zero --- if so, it must be a bad superblock!
This commit is contained in:
parent
75d83bec5f
commit
f0687a5e57
@ -1,3 +1,9 @@
|
||||
1999-05-03 <tytso@rsts-11.mit.edu>
|
||||
|
||||
* openfs.c (ext2fs_open): Check to make sure that the number of
|
||||
blocks per group is not zero --- if so, it must be a bad
|
||||
superblock!
|
||||
|
||||
1999-01-09 Theodore Ts'o <tytso@rsts-11.mit.edu>
|
||||
|
||||
* Release of E2fsprogs 1.14
|
||||
|
@ -163,6 +163,10 @@ errcode_t ext2fs_open(const char *name, int flags, int superblock,
|
||||
/*
|
||||
* Read group descriptors
|
||||
*/
|
||||
if ((EXT2_BLOCKS_PER_GROUP(fs->super)) == 0) {
|
||||
retval = EXT2_ET_CORRUPT_SUPERBLOCK;
|
||||
goto cleanup;
|
||||
}
|
||||
fs->group_desc_count = (fs->super->s_blocks_count -
|
||||
fs->super->s_first_data_block +
|
||||
EXT2_BLOCKS_PER_GROUP(fs->super) - 1)
|
||||
|
Loading…
Reference in New Issue
Block a user