Removed the uninitialized read for invalid superblocks

This commit is contained in:
Christopher Haster
2018-03-19 00:39:40 -05:00
parent 58f3bb1f08
commit d9c076d909

2
lfs.c
View File

@@ -2199,7 +2199,7 @@ int lfs_mount(lfs_t *lfs, const struct lfs_config *cfg) {
} }
if (err || memcmp(superblock.d.magic, "littlefs", 8) != 0) { if (err || memcmp(superblock.d.magic, "littlefs", 8) != 0) {
LFS_ERROR("Invalid superblock at %d %d", dir.pair[0], dir.pair[1]); LFS_ERROR("Invalid superblock at %d %d", 0, 1);
return LFS_ERR_CORRUPT; return LFS_ERR_CORRUPT;
} }