Skip to content

LoadCCache does not check file length #524

Open
@hwipl

Description

@hwipl

Currently, the LoadCCache() function does not check the length of the credentials cache file. This causes a panic in Unmarshal()
when parsing a short ccache file like, e.g., an empty file.

LoadCCache() already handles file reading errors returned by os.ReadFile(). So, it could be useful to also check a minimum ccache file length and return an error in case of a short file to avoid the panic. I'll open a PR with a suggestion. I hope, that's OK :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions