X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=crypto%2Fablkcipher.c;h=2731acb86e7d53755bbfd3d7cdc98926844ca887;hb=2843483d2eb02ad104edbe8b2429fb6a39d25063;hp=1c166b47b4cc5b5a627c9ab5a8821d7f4f482779;hpb=489de30259e667d7bc47da9da44a0270b050cd97;p=~andy%2Flinux diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c index 1c166b47b4c..2731acb86e7 100644 --- a/crypto/ablkcipher.c +++ b/crypto/ablkcipher.c @@ -16,10 +16,13 @@ #include #include #include +#include #include +#include #include -static int setkey_unaligned(struct crypto_ablkcipher *tfm, const u8 *key, unsigned int keylen) +static int setkey_unaligned(struct crypto_ablkcipher *tfm, const u8 *key, + unsigned int keylen) { struct ablkcipher_alg *cipher = crypto_ablkcipher_alg(tfm); unsigned long alignmask = crypto_ablkcipher_alignmask(tfm); @@ -35,7 +38,7 @@ static int setkey_unaligned(struct crypto_ablkcipher *tfm, const u8 *key, unsign alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); memcpy(alignbuffer, key, keylen); ret = cipher->setkey(tfm, alignbuffer, keylen); - memset(alignbuffer, 0, absize); + memset(alignbuffer, 0, keylen); kfree(buffer); return ret; } @@ -91,10 +94,6 @@ static void crypto_ablkcipher_show(struct seq_file *m, struct crypto_alg *alg) seq_printf(m, "min keysize : %u\n", ablkcipher->min_keysize); seq_printf(m, "max keysize : %u\n", ablkcipher->max_keysize); seq_printf(m, "ivsize : %u\n", ablkcipher->ivsize); - if (ablkcipher->queue) { - seq_printf(m, "qlen : %u\n", ablkcipher->queue->qlen); - seq_printf(m, "max qlen : %u\n", ablkcipher->queue->max_qlen); - } } const struct crypto_type crypto_ablkcipher_type = {