From e1f90f3c757cc445ef779c85a694f751a0371d57 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Wed, 7 Oct 2009 18:13:29 +0000 Subject: [PATCH] Fix krb5_c_weak_enctype in the case of invalid enctypes; r22839 simplified it a bit too much. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22865 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/krb/valid_enctype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/crypto/krb/valid_enctype.c b/src/lib/crypto/krb/valid_enctype.c index 0240cbc6f..b5c61d360 100644 --- a/src/lib/crypto/krb/valid_enctype.c +++ b/src/lib/crypto/krb/valid_enctype.c @@ -45,5 +45,5 @@ krb5_c_weak_enctype(krb5_enctype etype) const struct krb5_keytypes *ktp; ktp = find_enctype(etype); - return ((ktp->flags & ETYPE_WEAK) != 0); + return (ktp != NULL && (ktp->flags & ETYPE_WEAK) != 0); } -- 2.26.2