diff options
author | Luke Howard <lukeh@padl.com> | 2010-05-24 17:17:45 +0000 |
---|---|---|
committer | Luke Howard <lukeh@padl.com> | 2010-05-24 17:17:45 +0000 |
commit | 5e9e94ca9e42d90ce6dd18721297c49012bf69e6 (patch) | |
tree | 7944880ca9d85342d0fd23295f7465e431fe4bb7 | |
parent | 118a12758da67da32e86ed56ce794dab6c3779fe (diff) | |
download | krb5-5e9e94ca9e42d90ce6dd18721297c49012bf69e6.zip krb5-5e9e94ca9e42d90ce6dd18721297c49012bf69e6.tar.gz krb5-5e9e94ca9e42d90ce6dd18721297c49012bf69e6.tar.bz2 |
cleanup
git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/camellia-ccm@24099 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/lib/crypto/krb/dk/dk_ccm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/crypto/krb/dk/dk_ccm.c b/src/lib/crypto/krb/dk/dk_ccm.c index 4d950dc..36f53d2 100644 --- a/src/lib/crypto/krb/dk/dk_ccm.c +++ b/src/lib/crypto/krb/dk/dk_ccm.c @@ -245,10 +245,9 @@ valid_payload_length_p(const struct krb5_keytypes *ktp, q = 15 - n; - maxblocks = (1U << (8 * q)); + maxblocks = (1U << (8 * q)) - 1 /* tag */; - nblocks = 1; /* tag */ - nblocks += (payload_len + block_size - 1) / block_size; + nblocks = (payload_len + block_size - 1) / block_size; return (nblocks <= maxblocks); } |