krb5: Fix crash in resolving "DIR" as a ccache name (Fix #1108)

This commit is contained in:
Nicolas Williams
2023-05-26 13:47:26 -05:00
parent 7812c17f95
commit 39f24c4cd4
2 changed files with 3 additions and 5 deletions

View File

@@ -377,7 +377,7 @@ dcc_resolve_2(krb5_context context,
*
*/
if (*res == '\0' || (res[0] == ':' && res[1] == '\0')) {
if (res == NULL || *res == '\0' || (res[0] == ':' && res[1] == '\0')) {
/* XXX Why not? */
krb5_set_error_message(context, KRB5_CC_FORMAT,
N_("\"DIR:\" is not a valid ccache name", ""));