[CRYPTO]: Fix zero-extension bug on 64-bit architectures.

Noticed by Ken-ichirou MATSUZAWA.

Signed-off-by: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Herbert Xu 2005-07-15 07:41:31 -07:00 • committed by David S. Miller
commit 9d853c3757
2 changed files with 4 additions and 4 deletions

View file

@ -75,7 +75,7 @@ static inline unsigned int crypto_cipher_ctxsize(struct crypto_alg *alg,
switch (flags & CRYPTO_TFM_MODE_MASK) {
case CRYPTO_TFM_MODE_CBC:
len = ALIGN(len, alg->cra_alignmask + 1);
len = ALIGN(len, (unsigned long)alg->cra_alignmask + 1);
len += alg->cra_blocksize;
break;
}