diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-06 21:25:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-06 21:25:06 -0400 |
commit | f27eb3afe87bd4b3fe919a6b7bf364f577ccee3b (patch) | |
tree | a8a49c07fd3aa992fbd508bc3fb9bf085ce56c01 /crypto/blkcipher.c | |
parent | 6f605d83dd3906bcf69280f8754df85f80538471 (diff) | |
parent | 06817176784f620984200dc5d7cbe16984f7b262 (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/blkcipher.c')
-rw-r--r-- | crypto/blkcipher.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c index 40a3dcff15bb..7755834b8846 100644 --- a/crypto/blkcipher.c +++ b/crypto/blkcipher.c | |||
@@ -352,7 +352,7 @@ static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, unsigned int | |||
352 | alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); | 352 | alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); |
353 | memcpy(alignbuffer, key, keylen); | 353 | memcpy(alignbuffer, key, keylen); |
354 | ret = cipher->setkey(tfm, alignbuffer, keylen); | 354 | ret = cipher->setkey(tfm, alignbuffer, keylen); |
355 | memset(alignbuffer, 0, absize); | 355 | memset(alignbuffer, 0, keylen); |
356 | kfree(buffer); | 356 | kfree(buffer); |
357 | return ret; | 357 | return ret; |
358 | } | 358 | } |