Skip to content

lfs_fs_gc causes nllptr deref when called before mounting #1201

@diggit

Description

@diggit

It happens here:

littlefs/lfs.c

Lines 5211 to 5213 in 6cb4e86

// available
if (lfs->cfg->compact_thresh
< lfs->cfg->block_size - lfs->cfg->prog_size) {

because lfs->cfg is set in lfs_init called from lfs_mount.

Is the missing assert for mounted state intentional?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions