Merge pull request #1180 from ChaserTlss/master
lfs: guard null callbacks in lfs_dir_fetchmatch
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user