Skip to content

SPIFFS maxPathLength is one character too large #1273

Closed
@PerTengdahl

Description

@PerTengdahl

Using SPIFFS.info to retrieve configuration parameters via the fsInfo struct gives unexpected results. It seems that the maxPathLength parameter includes the trailing null character. This is not what is expected and not "self-explanatory" as the documentation suggests. It should be possible to use the normal strlen() function to check if the filename is too long. SPIFFS says maxPathLengt is 32 but any file name with strlen(filename) larger than 31 gives problems. It seems that there is no checking of long filenames so that memory is corrupted when file names longer than 31 characters are used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions