fix: add missing return causing uninitialized reads

If lfs_bd_read fails, lfs_fcrc_fromle32 will read uninitialized memory, and hasfcrc will be set to true.

This may end up in a "working" state later due to crcs not matching. but it's hard to follow if that woud be the case.
This commit is contained in:
Joakim Plate
2025-08-12 17:03:40 +02:00
committed by GitHub
parent 8e251dd675
commit 8b75de74c9

1
lfs.c
View File

@@ -1279,6 +1279,7 @@ static lfs_stag_t lfs_dir_fetchmatch(lfs_t *lfs,
if (err == LFS_ERR_CORRUPT) {
break;
}
return err;
}
lfs_fcrc_fromle32(&fcrc);