ChangeLog, e2fsck.h, journal.c, problem.c, problem.h, super.c:
super.c (check_super_block): Be more strict on checking
s_r_blocks_count superblock field.
problem.c, problem.h (PR_0_JOURNAL_UNSUPP_ROCOMPAT,
PR_0_JOURNAL_UNSUPP_INCOMPAT, PR_0_JOURNAL_RESET_COMPAT): New problem
codes.
journal.c (e2fsck_journal_load): Use a problem code to report
unsupported feature flags. There is code to clear unsupported flags,
but since this is dangerous, it's not allowed in the problem code
table.
journal.c (e2fsck_journal_reset_super): initialize the journal
sequence number to a random value to avoid recovering bad transactions
from a corrupt journal.
diff --git a/e2fsck/super.c b/e2fsck/super.c
index ce78715..7a4a64a 100644
--- a/e2fsck/super.c
+++ b/e2fsck/super.c
@@ -336,7 +336,7 @@
MIN_CHECK | MAX_CHECK, inodes_per_block,
inodes_per_block * (blocks_per_group-4));
check_super_value(ctx, "r_blocks_count", sb->s_r_blocks_count,
- MAX_CHECK, 0, sb->s_blocks_count);
+ MAX_CHECK, 0, sb->s_blocks_count / 4);
if (!ctx->num_blocks) {
pctx.errcode = e2fsck_get_device_size(ctx);