mirror of
https://github.com/eledio-devices/thirdparty-littlefs.git
synced 2025-11-01 16:14:13 +01:00
Removed the uninitialized read for invalid superblocks
This commit is contained in:
2
lfs.c
2
lfs.c
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user