Fix a couple of bugs in krb5_c_valid_enctype():

1.  on errors, it appears to core dump, and

      2.  the sense of the return code is inverted from the
          MIT implementation.

Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
This commit is contained in:
Roland C. Dowdeswell
2011-07-19 10:38:18 +01:00
committed by Love Hörnquist Åstrand
parent 7aaba443bc
commit 3ef06de67b
2 changed files with 10 additions and 8 deletions

View File

@@ -139,7 +139,7 @@ krb5_checksum_free(krb5_context context, krb5_checksum *cksum)
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
krb5_c_valid_enctype (krb5_enctype etype)
{
return krb5_enctype_valid(NULL, etype);
return !krb5_enctype_valid(NULL, etype);
}
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL