diff --git a/lfs.c b/lfs.c index d976389..c0092ca 100644 --- a/lfs.c +++ b/lfs.c @@ -3761,6 +3761,12 @@ static int lfs_rawmount(lfs_t *lfs, const struct lfs_config *cfg) { lfs->attr_max = superblock.attr_max; } + + if (superblock.block_count != lfs->cfg->block_count) + { + err = LFS_ERR_CORRUPT; + goto cleanup; + } } // has gstate?