jcmturner / gokrb5

Pure Go Kerberos library for clients and services
Apache License 2.0
717 stars 243 forks source link

Check CCache file length in LoadCCache() #525

Open hwipl opened 1 year ago

hwipl commented 1 year ago

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