X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=crypto%2Fcipher.c;h=9a1a7316eeacf6f71befe1b149283a4350db0c56;hb=f4b0373b26567cafd421d91101852ed7a34e9e94;hp=0b2650c2014be315703365cd8e040d380c6d447b;hpb=ca7c39385ce1a7b44894a4b225a4608624e90730;p=pandora-kernel.git diff --git a/crypto/cipher.c b/crypto/cipher.c index 0b2650c2014b..9a1a7316eeac 100644 --- a/crypto/cipher.c +++ b/crypto/cipher.c @@ -16,11 +16,12 @@ #include #include #include -#include +#include #include #include "internal.h" -static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) +static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, + unsigned int keylen) { struct cipher_alg *cia = &tfm->__crt_alg->cra_cipher; unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); @@ -36,7 +37,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;