From: Greg Hudson Date: Tue, 20 Oct 2009 13:47:40 +0000 (+0000) Subject: In krb5_k_make_checksum, check for a null key passed with a keyed X-Git-Tag: krb5-1.8-alpha1~289 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dd3c61e969734b1f68c925268bd9980d5bce19c1;p=krb5.git In krb5_k_make_checksum, check for a null key passed with a keyed checksum instead of just crashing. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22952 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/krb/make_checksum.c b/src/lib/crypto/krb/make_checksum.c index dd34df377..01e374b14 100644 --- a/src/lib/crypto/krb/make_checksum.c +++ b/src/lib/crypto/krb/make_checksum.c @@ -68,7 +68,7 @@ krb5_k_make_checksum(krb5_context context, krb5_cksumtype cksumtype, /* check if key is compatible */ if (ctp->keyed_etype) { ktp1 = find_enctype(ctp->keyed_etype); - ktp2 = find_enctype(key->keyblock.enctype); + ktp2 = key ? find_enctype(key->keyblock.enctype) : NULL; if (ktp1 == NULL || ktp2 == NULL || ktp1->enc != ktp2->enc) { ret = KRB5_BAD_ENCTYPE; goto cleanup;