diff options
| author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-26 15:38:17 +0000 |
|---|---|---|
| committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-26 15:38:17 +0000 |
| commit | 55e0987aea18d0b97fc0444c7678cbca1c7761d0 (patch) | |
| tree | 1bff72784c0591a61e4e16e97fae48d0614891dc /sys/kgssapi | |
| parent | c9087a9303414611bc4cbb6feae39d5daecb745f (diff) | |
Notes
Diffstat (limited to 'sys/kgssapi')
| -rw-r--r-- | sys/kgssapi/krb5/kcrypto.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kgssapi/krb5/kcrypto.c b/sys/kgssapi/krb5/kcrypto.c index 27ee3ec466e8..84c5b498a998 100644 --- a/sys/kgssapi/krb5/kcrypto.c +++ b/sys/kgssapi/krb5/kcrypto.c @@ -202,8 +202,7 @@ krb5_derive_key(struct krb5_key_state *inkey, * Generate enough bytes for keybits rounded up to a multiple * of blocklen. */ - randomlen = ((ec->ec_keybits/8 + ec->ec_blocklen - 1) / ec->ec_blocklen) - * ec->ec_blocklen; + randomlen = roundup(ec->ec_keybits / 8, ec->ec_blocklen); bytes = malloc(randomlen, M_GSSAPI, M_WAITOK); MGET(m, M_WAITOK, MT_DATA); m->m_len = ec->ec_blocklen; |
