diff --git a/lib/krb5/rd_req.c b/lib/krb5/rd_req.c index bf96013f3..713893eaf 100644 --- a/lib/krb5/rd_req.c +++ b/lib/krb5/rd_req.c @@ -857,7 +857,7 @@ krb5_rd_req_ctx(krb5_context context, &o->keyblock); if (ret) goto out; - } else if(inctx->keyblock){ + } else if(inctx && inctx->keyblock){ ret = krb5_copy_keyblock(context, inctx->keyblock, &o->keyblock); @@ -897,9 +897,9 @@ krb5_rd_req_ctx(krb5_context context, goto out; } else { - krb5_keytab id = NULL; - krb5_kt_cursor cursor; krb5_keytab_entry entry; + krb5_kt_cursor cursor; + krb5_keytab id = NULL; int done = 0, kvno = 0; memset(&cursor, 0, sizeof(cursor)); @@ -992,7 +992,7 @@ krb5_rd_req_ctx(krb5_context context, /* If there is a PAC, verify its server signature */ - if (inctx->check_pac) { + if (inctx == NULL || inctx->check_pac) { krb5_pac pac; krb5_data data;