Skip to content

Check CCache file length in LoadCCache()#525

Open
hwipl wants to merge 1 commit intojcmturner:masterfrom
hwipl:check-credentials-cache-file-length
Open

Check CCache file length in LoadCCache()#525
hwipl wants to merge 1 commit intojcmturner:masterfrom
hwipl:check-credentials-cache-file-length

Conversation

@hwipl
Copy link

@hwipl hwipl commented Jul 5, 2023

The LoadCCache() function does not check the file length of the ccache file and Unmarshal() panics when parsing a short ccache file like, e.g., an empty file. So, check a minimum ccache file length before unmarshalling it.

Closes #524

Check the file length of the credentials cache file in LoadCCache() to
avoid a panic when parsing a short ccache file, e.g., an empty file.

Signed-off-by: hwipl <33433250+hwipl@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LoadCCache does not check file length

1 participant