aboutsummaryrefslogtreecommitdiff
path: root/crypto/cipher.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-06 18:25:06 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-06 18:25:06 -0700
commitf27eb3afe87bd4b3fe919a6b7bf364f577ccee3b (patch)
treea8a49c07fd3aa992fbd508bc3fb9bf085ce56c01 /crypto/cipher.c
parent6f605d83dd3906bcf69280f8754df85f80538471 (diff)
parent06817176784f620984200dc5d7cbe16984f7b262 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: [CRYPTO] api: fix writting into unallocated memory in setkey_aligned
Diffstat (limited to 'crypto/cipher.c')
-rw-r--r--crypto/cipher.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/cipher.c b/crypto/cipher.c
index 0b2650c2014..fc6b46f2a9b 100644
--- a/crypto/cipher.c
+++ b/crypto/cipher.c
@@ -36,7 +36,7 @@ static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, unsigned int
alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
memcpy(alignbuffer, key, keylen);
ret = cia->cia_setkey(tfm, alignbuffer, keylen);
- memset(alignbuffer, 0, absize);
+ memset(alignbuffer, 0, keylen);
kfree(buffer);
return ret;