From 3be262050cee697421aee17448cd7cb134c41423 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Tue, 15 Mar 2005 06:32:39 +0000 Subject: [PATCH] krb5_c_is_keyed_cksum() is a boolean function. It cannot safely return an error value. Change the error condition to return False (0) instead of 0xFFFFFFFF. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17127 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/ChangeLog | 9 +++++++++ src/lib/crypto/keyed_cksum.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/crypto/ChangeLog b/src/lib/crypto/ChangeLog index feccaa791..fa03524a3 100644 --- a/src/lib/crypto/ChangeLog +++ b/src/lib/crypto/ChangeLog @@ -1,3 +1,12 @@ +2005-03-15 Jeffrey Altman + + * keyed_cksum.c: (krb5_c_is_keyed_cksum): this is a boolean + function. It should not return -1U on error. Instead return + 0 (false) so that the caller doesn't think it succeeded. + + The only two callers are rd_safe and mk_safe. Neither checks + for special cases. + 2005-01-13 Ken Raeburn * prng.c (krb5int_prng_init): Incorporate do_yarrow_init body. diff --git a/src/lib/crypto/keyed_cksum.c b/src/lib/crypto/keyed_cksum.c index 7056f8f99..4d50c2c4a 100644 --- a/src/lib/crypto/keyed_cksum.c +++ b/src/lib/crypto/keyed_cksum.c @@ -45,7 +45,7 @@ krb5_c_is_keyed_cksum(krb5_cksumtype ctype) /* ick, but it's better than coredumping, which is what the old code would have done */ - return -1U; + return 0; /* error case */ } krb5_boolean KRB5_CALLCONV -- 2.26.2