Allow krb5_verify_init_creds() to take NULL opt arg.

Without dereferencing it.  krb5_verify_init_creds_opt * to be
precise.
This commit is contained in:
Roland C. Dowdeswell
2012-12-22 00:23:18 +08:00
parent 087c859db6
commit ce5c231b23

View File

@@ -55,15 +55,18 @@ static krb5_boolean
fail_verify_is_ok (krb5_context context,
krb5_verify_init_creds_opt *options)
{
if ((options->flags & KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL
if (options && (options->flags & KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL)
&& options->ap_req_nofail != 0)
|| krb5_config_get_bool (context,
return FALSE;
if (krb5_config_get_bool(context,
NULL,
"libdefaults",
"verify_ap_req_nofail",
NULL))
return FALSE;
else
return TRUE;
}