X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=crypto%2Fhash.c;h=7dcff671c19b6d91a6127467b57c4db91a23fff4;hb=5539ae9613587e4a4eec42d420b8bdd9ff552a65;hp=4d75ca7b57b207fd2466b8adc03e0d42615150e7;hpb=d3502d7f25b22cfc9762bf1781faa9db1bb3be2e;p=linux-2.6-omap-h63xx.git diff --git a/crypto/hash.c b/crypto/hash.c index 4d75ca7b57b..7dcff671c19 100644 --- a/crypto/hash.c +++ b/crypto/hash.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include "internal.h" @@ -40,13 +41,13 @@ static int hash_setkey_unaligned(struct crypto_hash *crt, const u8 *key, alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); memcpy(alignbuffer, key, keylen); ret = alg->setkey(crt, alignbuffer, keylen); - memset(alignbuffer, 0, absize); + memset(alignbuffer, 0, keylen); kfree(buffer); return ret; } static int hash_setkey(struct crypto_hash *crt, const u8 *key, - unsigned int keylen) + unsigned int keylen) { struct crypto_tfm *tfm = crypto_hash_tfm(crt); struct hash_alg *alg = &tfm->__crt_alg->cra_hash;