Merge pull request #1180 from ChaserTlss/master

lfs: guard null callbacks in lfs_dir_fetchmatch
This commit is contained in:
Christopher Haster
2026-03-24 17:26:08 -05:00
committed by GitHub
+1
View File
@@ -1291,6 +1291,7 @@ static lfs_stag_t lfs_dir_fetchmatch(lfs_t *lfs,
// found a match for our fetcher? // found a match for our fetcher?
if ((fmask & tag) == (fmask & ftag)) { if ((fmask & tag) == (fmask & ftag)) {
LFS_ASSERT(cb != NULL);
int res = cb(data, tag, &(struct lfs_diskoff){ int res = cb(data, tag, &(struct lfs_diskoff){
dir->pair[0], off+sizeof(tag)}); dir->pair[0], off+sizeof(tag)});
if (res < 0) { if (res < 0) {