summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-10-05 16:17:08 +0100
committerMark Brown <broonie@kernel.org>2015-10-05 16:17:08 +0100
commitc88af149b0fcdd56bdda2ea9f239470c7834ea12 (patch)
tree1d102927807aa7c12a8a66cbb59d6560c6520645
parentfc4d0d2a1b069a231939ca4b01a3d003e77c723a (diff)
parent733601f243cfd24755f2c120fb9f9ec284fa5ca1 (diff)
downloadlinux-crypto-c88af149b0fcdd56bdda2ea9f239470c7834ea12.tar.gz
linux-crypto-c88af149b0fcdd56bdda2ea9f239470c7834ea12.zip
Merge tag 'ib-mfd-regulator-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into regulator-tps6105x
Immutable branch between MFD and Regulator due for v4.3
-rw-r--r--crypto/testmgr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 35c2de13..fa18753f 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -940,6 +940,7 @@ static int __test_skcipher(struct crypto_skcipher *tfm, int enc,
char *xbuf[XBUFSIZE];
char *xoutbuf[XBUFSIZE];
int ret = -ENOMEM;
+ unsigned int ivsize = crypto_skcipher_ivsize(tfm);
if (testmgr_alloc_buf(xbuf))
goto out_nobuf;
@@ -975,7 +976,7 @@ static int __test_skcipher(struct crypto_skcipher *tfm, int enc,
continue;
if (template[i].iv)
- memcpy(iv, template[i].iv, MAX_IVLEN);
+ memcpy(iv, template[i].iv, ivsize);
else
memset(iv, 0, MAX_IVLEN);
@@ -1051,7 +1052,7 @@ static int __test_skcipher(struct crypto_skcipher *tfm, int enc,
continue;
if (template[i].iv)
- memcpy(iv, template[i].iv, MAX_IVLEN);
+ memcpy(iv, template[i].iv, ivsize);
else
memset(iv, 0, MAX_IVLEN);